Mozilla Releases Fennec Alpha 2

Mozilla announced the availability of Fennec alpha 2. This new prerelease version of the organization’s mobile browser has some much-needed performance improvements that increase the responsiveness of the program and adds faster page loads and faster scrolling.

According to Mozilla developer Stuart Parmenter, the first alpha was focused on the user experience. This second alpha is focused on improving performance, with major strides being made in startup performance, panning and zooming performance, and responsiveness while pages are loading. Parmenter also notes that they’ve re-factored a significant amount of the front-end code, which enabled substantial speed improvements and will provide a better base for extension authors to build upon.

Fennec aims to bring the full power of Gecko and Firefox 3 to handheld devices. Fennec’s main content area is rendered on a canvas element instead of using a conventional browser element. The content itself is painted on the canvas using the drawWindow method, which is a nonstandard function that Mozilla added to its implementation of the canvas JavaScript API. Fennec utilizes the canvas to improve panning and zooming performance. Developers later discovered that the canvas incurs a high overhead during display updates, so Mozilla XUL guru Mark Finkle explains that they switched to using the drawImage function (which is quite a bit faster) to update thumbnails whenever possible. Finkle also provides additional insight into the underlying implementation and optimization techniques used to increase the browser’s responsiveness.

Instead of repainting the entire canvas after every change, the new version of Fennec also hooks into the MozAfterPaint event to update regions conditionally. Finkle further describes File I/O optimizations that improve startup time.

The value of having the entire Firefox stack in a mobile environment are being increasingly apparent: Developers have already begun creating add-ons for the new browser that increase its functionality, such as the TwitterBar extension that lets users post to Twitter directly from the Fennec address bar. An early Fennec port of Mozilla’s Weave framework is also in the work.

Although the final release is probably still a little ways away, you can check out this video of Fennec Alpha 2, or download it here.

Fennec Alpha 2 Overview from Madhava Enros on Vimeo.