On a daily basis we are working on machines with 4, 8, 12 or even more cores. Not so long ago, 12 cores was considered exotic hardware.
Making apps run well on a multi-threaded environment is a whole study in itself.
One thing that can help along the way is to understand where threads in your application are "stuck" waiting on other threads.
Rather than re-iterate what has already been said quite well - look here http://msdn.microsoft.com/en-us/magazine/ff714587.aspx
Be aware that if you have worker threads blocking on queues, or waiting for some form of I/O they will show up as "concurrency problems" - ie threads that are blocked.
For your first pass, pretty much ignore these points in your code, the threads are supposed to be blocked there. Focus on the points where you do not expect threads to be blocked.
For you second pass, you may want to consider if you need to think about how many threads you have "waiting" for things to happen. Do you end up loosing too much of you CPU to swapping threads in and out?
Once you get to that level, a short blog post is not going to help you much though.
There are lots of books and websites about software design. But often, the devil is in the details. Look after the pennies and the pounds look after themselves. There are a whole lot of little thing that if you pay attention to them, it just makes life a little easier. This is about the little things.
Friday, November 11, 2011
Wednesday, November 2, 2011
Is your VS2010 running slowly?
VS2010 is nice.
It keeps files open for
you.
Even when you shut down and then
start up again.
Unless you periodically close all
windows, they build up.
Then things start to slow down.
Solution, [Alt-W]
L
Ie Close all
windows.
Note - I have Resharper running, this may or may not be related. The solution is so trivial, and life without Resharper would be unthinkable. As such, I'm not planning on un-installing Resharper and testing to see if it's part of the problem or not, if you want to run this test, please do, and post a comment with the result.
Subscribe to:
Posts (Atom)