Monday, October 13, 2008

TechTip: Taming Adobe Flash Plugin for Firefox

As I've said before, Mozilla Firefox 3.x is currently my preferred web browser, whether it's on Linux, Windows or any other platform that it has been ported to.

Firefox, like any piece of complex software however, is definitely not perfect. Some problems are beyond Mozilla's control though -- for example problems caused by badly behaved third-party plugins. Arguably the most irritating plugin problem impacting Firefox users today is caused by Adobe/Macromedia's poorly written Shockwave Flash plugin (NPSWF32.dll).

Flash is the de facto standard for delivering interactive rich media content over the web. It is so widely used that the Flash plugin is a must have for any major modern web browser. The problem however, is that Adobe's Flash plugin (all previous versions including the latest version 9.0 r124) for Mozilla Firefox & other Mozilla-based browsers is a resource hog and has a tendency to slowly leak memory and become unstable if left running for too long. For the most part, the Adobe Flash plugin for Firefox works adequately, but I would venture a guess that for upwards of 90% of web browser stability problems that users encounter in Firefox -- such as freezing up, crashing or sucking up system resources (CPU & memory), etc. -- the culprit is most likely Adobe's Flash Plugin.

Comparatively, the Flash ActiveX control for Microsoft's Internet Explorer seems to perform much better in terms of resource usage and reliability, however performance of the Flash plugin is hardly a deal breaker for me.

Google Chrome uses the Mozilla-based browser plugin system, and therefore uses the same Flash plugin that Firefox uses. Consequently, Chrome suffers from pretty much all the same Flash plugin problems that you might encounter in Firefox. However, since Chrome isolates memory for each process/tab and plugins, it is easier to control / kill & restart dysfunctional processes and plugins using its built-in Task manager.

Lately one particularly annoying problem that I've suddenly started to experience with the Flash plugin in Firefox is that every time after restarting from hibernation in Windows XP, there is no sound in any flash content (for example YouTube videos & other flash animations). Closing and restarting Firefox fixes the problem, but it's a pain. I usually like to have Firefox save and restore my session and all my tabs, which makes it a little easier, but it's still an big inconvenience nonetheless.

The Solution:

I have recently come across a workaround for this issue which doesn't require closing and restarting Firefox entirely. Simply go to the Tools menu, choose Add-ons to open the Add-ons manager window, choose the Plugins category, then look for and select the Shockwave Flash plugin. Hit the Disable button, which will kill Flash on all web pages you currently have open in Firefox, then re-enable the plugin and close the Add-ons window.

You will need to reload any web page with flash content, but this should clear up most Flash plugin-related problems without having to restart the web browser entirely.

Just for kicks, open the Windows Task Manager along side the Firefox Add-ons manager window. Switch to the Processes tab and locate firefox.exe. Watch what happens to the memory usage as you disable the Shockwave Flash plugin... satisfying, eh?

This trick of disabling and reenabling individual plugins in Firefox without restarting the whole application can probably be applied to any misbehaving plugin (not just Adobe Flash), or when you suspect that plugins are chewing up your resources and you want to try manually flushing the memory used by the firefox.exe process.

No comments: