Followers

Thursday, December 25, 2008

Mozilla releases second alpha of Fennec mobile browser

By Ryan Paul

Mozilla has announced the availability of Fennec alpha 2, a new prerelease of the organization's evolving mobile browser. This version includes some much-needed performance optimizations that improve the responsiveness of the program.

The Fennec project, which aims to bring the full power of Gecko and Firefox 3 to handheld devices, was first announced last year. Mozilla's successful effort to reduce memory consumption during the Firefox 3 development cycle finally made the browser a viable choice for resource-constrained mobile environments. Mozilla also built an improved JavaScript engine this year called TraceMonkey that has delivered big performance gains.

Despite all of that heavy optimization work, the first Fennec alpha, which was released in October, was very sluggish. Our tests on the Nokia N810 found it to be promising, but still far from usable. The situation has improved considerably in the new alpha release, which offers faster loading and scrolling.

"While we focused much of the previous alpha on getting the user experience how we wanted, we've spent much of the time since focused on improving performance," wrote Mozilla developer Stuart Parmenter in a blog entry. "We've made major strides improving startup performance, panning and zooming performance, and responsiveness while pages are loading."

Mozilla XUL guru Mark Finkle also wrote about the new release and published a blog entry that provides insight into some aspects of the underlying implementation and several of the specific optimization techniques that were used to increase the browser's responsiveness.

Fennec's main content area is rendered on a canvas element instead of using a conventional browser element. The content is painted on the canvas with the drawWindow method, a nonstandard function that Mozilla added to its own implementation of the canvas JavaScript API. Fennec uses the canvas in order to improve panning and zooming performance, but the developers discovered that it incurs a high overhead during display updates. Finkle explains that they switched to using the drawImage function for updating thumbnails when possible, which is quite a bit faster.

The new version also hooks into the MozAfterPaint event so that canvas regions can be updated conditionally as needed instead of repainting the entire canvas after every change. In addition to the rendering performance enhancements, Finkle also describes File I/O optimizations that improve startup time.

As Fennec development continues to move forward, the value and significance of having the complete Firefox stack in a mobile environment is becoming increasingly apparent. Developers have already started creating innovative add-ons for the new browser that increase its functionality in various ways. For example, the TwitterBar extension allows users to post to Twitter directly from the Fennec address bar. An early Fennec port of Mozilla's Weave framework is also underway.

The new version is available for download from the Mozilla web site. A package is provided for Nokia N810 devices that are running OS2008. There is also a XULRunner-based version that can be used to test the browser on desktop computers. For download links and more details about Fennec alpha 2, see the official release notes.

Original here

No comments: