Extensibility is a double-edged sword. It's a keystone feature in Firefox - differentiating even now that just about every other browser has some vector for augmentation. However, along with the freedom and power of Firefox extensions comes the ability to slow the browser down. And worse, users and developers have little or no visibility into the causes of poor extension performance.
Not all extensions slow Firefox down. But they can. To prevent that, we need to do three things:
- Make it *easy* for extension developers to keep their extensions fast.
- Allow users to see the performance effect of their extensions.
- Mitigate the effects of badly-behaving extensions in Firefox itself.
For Extension Developers
First, we need to loudly and clearly educate extension developers, and provide them tools. Some ideas:
- Write an extension performance "best practices" guide on MDC.
- Build warnings into Firefox, that highlight code that might perform poorly (bug 550242).
- Provide a try-server that allows extensions to be uploaded and installed into the test profile.
- Perform automated performance testing of extensions upload to AMO (bug 458990, maybe?)
- Ensure that Jetpack generates extensions that are models for good behavior.
Users should be able to make informed choices about the extensions they install, and be able to monitor the effect of extensions on their browsing sessions. We could:
- Provide performance information for extensions on their pages on AMO.
- Build a performance dashboard similar to about:memory, but tracking startup time, page-load time, and browser UI behavior such as menu responsiveness. Given a visualization of these things over time, users can see the effects of installing different extensions.
In the Core
There are also things we can do to mitigate poor performance in core Firefox code. This is being discussed in bug 533038.
We're already working on some of the ideas listed above. Ping me in #startup on irc.mozilla.org if you want to help out. If you have ideas for other ways to improve extension performance, or to communicate back to users and developers, let me know in the comments.