facebook Apps not running well on your fancy new multi-core computer?
Blame Adobe Flash and Internet Explorer 8, not facebook.
Personally, I had never had a problem running any of the facebook apps or games, because I use a Mac. However, I recently started a new job where I am required to use Windows. On that brand spanking new Core 2 Duo PC, with Windows 7 on it, my Cafe World, FarmVille, and Happy Aquarium run so slowly they're impossible to play. Often they ran so badly that I closed Internet Explorer out of frustration.
My initial reaction was to call Windows 7 a broken piece of junk, and only use it when absolutely required. However, I may have jumped to a conclusion that was made in haste.
Windows 7 actually runs fine, and is doing it's job far better than Windows Vista, or Windows XP ever did. Yes, I'm willing to admit that I don't hate Windows 7 as much as I hated Windows Vista, or XP. That's not to say that I like Windows 7, I just don't hate it as much.
Back to the issue at hand. facebook Apps and Games that use Adobe Flash.
As it turns out, many of the Flash based Apps and games are designed to use one CPU. Those apps and games that are designed to use only one CPU, work fine, however the apps/games I mentioned above aren't specifically coded to only use one CPU, so they attempt to spread their requirements across all of your CPUs and end up falling over and breaking.
This does tend to be less of a problem in Mozilla Firefox, but it's still a problem on Multi-core or Multi-processor computers. If you use Internet Explorer 8 (IE8) you'll really see the problem on a multi-core computer.
Any time you launch IE8, it fires up at least two copies of iexplorer.exe, because it assumes you're going to open more than one website, in more than one tab. So it wants to be ready to fire up more versions of iexploere.exe. This is called application multi-threading, and is supposed to be able to make browsing the web faster on today's modern CPUs.
Unfortunately, Microsoft has never worked out how to properly handle multi-thread applications, so it essentially works by filling up the first CPU, and then moving on to the second, or third as needed. Under normal circumstances, this doesn't present a problem. However when you add Adobe Flash based games or apps into the mix, things get all screwed up.
Flash, works well when it can read and write instructions to a single processor, but if you send instructions to different processors, the commands/code/bits-n-bytes
get lost, confused and take longer to be processed.
Imagine it like this: On one side of a tennis court you have IE8 and Flash and flash is standing on the shoulders of IE8. On the other side of a tennis court you have two CPUs standing 5 feet apart. The object of this particular tennis match is for Flash to fire tennis balls at both of the CPUs on the other side of the net, and to catch the tennis balls as they are fired back from the CPUs. The problem here is that IE8 is not allowed to remain stationary, instead with Flash on his shoulders he's running back and forth to stand directly in front of each of the opposing CPUs. Naturally, you can see the problem that Flash will have even hitting the target CPUs, but catching the returned tennis balls, is damn near impossible.
But don't worry too much, because there is a fix, but it's complicated and difficult to do.
This all has to do with changing the Processor Affinity for iexplore.exe. Sounds clear as mud, right?
In order to implement this, you'll have to do it every time you start IE8, and I don't know if it's possible to make this change permanent.
Step 1. Launch Internet Explorer 8
Step 2. Press Ctrl+Alt+Del (yep give it the old 3 finger salute)
Step 3. Click the "Start Task Manager" button.
Step 4. In the Windows Task Manager window, click the "Processes" Tab.
Step 5. Find a running process called "iexplore.exe" there will probably be at least two running, maybe more if you have more than one tab open.
Step 6. Right Click on "iexplore.exe" and choose "Set Affinity" from the context menu.
Step 7. Depending on the number of CPUs you computer has in it, everyone will see something different here. In my Core 2 Duo I see "<All Processors> and CPU 0 and CPU 1" all with check boxes to the left. At this point, you only need to have one CPU checked, so IE8 will stand still in front of one CPU, instead of running back and forth.
Step 8. Uncheck everything except for "CPU 0" (please note that if there are two CPUs listed, unchecking CPU 1, will automatically uncheck "<All Processors>")
Step 9. Click Okay, and then close the Windows Task Manager
Step 10. Remember this isn't a "sticky" fix. So if you close IE8 for any reason, you'll have to go back and repeat these steps again.
I recommend doing this while you have a flash game or app running, because you will immediately see a difference.
If I want to play a facebook flash based game, I do this every time. I don't have any problem with the performance, once I lock IE8's feet to one spot, so it stops running around like an idiot.
Enjoy and feel free to let folks know.