Fennec 1.0 Beta 1 – New and Notable

We released Fennec 1.0 Beta 1 for Maemo! Go read Stuart’s announcement for a good overview of the release. Be sure to watch Madhava’s video walkthrough too. Like Stuart, I am now using Fennec as the default browser on my N810 tablet. We have reached a solid milestone for performance and stability.

What’s New

Most of the work for this release was not visible UI features. Getting the Flash plugin to render onto Fennec’s canvas display surface was a big step. We also added the ability to pan any scrollable list in the chrome UI. So the bookmark list, add-on list, download list, preference list – and so on – now support scrolling/panning just like the main web content. We still need to add support for iframes and web content lists, which are trickier since they kind of conflict with panning the content itself.

Another area that has seen a lot of work is the rendering mechanism – the code that takes the content of the hidden browser element and renders it to the visible canvas display surface. Fennec Beta 1 has better pageload times and much better panning performance because of this work. For more background on what I’m talking about, read this post and the referenced article.

We did add some visible UI features. A big one is the new bookmark list. Fennec now supports bookmark folders and has capabilities for managing your bookmarks and folders. We still have some polish work to do, but the basics are all functional.

The default font size is a bit larger too, making it easier to read text content when Fennec auto-zooms web pages.

I almost forgot – JavaScript JIT is on by default for web content. It makes a big difference. The ARM related fixes to the JIT code made that possible.

What’s Notable

Our never ending struggle to make Fennec (and the Mozilla platform in general) as fast as possible on mobile devices has yielded a few more nuggets. Vlad and Taras have been hammering away on the rendering mechanism. Some parts of the process we can control better than others. The actual drawWindow call still dominates the time to render. We still try to improve the drawWindow performance, but there is only so much we can do. Instead, we try to limit the calls to drawWindow and limit the size of area we need to render.

Another area we can make improvements is overhead of XPConnect – the bridge between JavaScript and C++. On mobile devices, the overhead from XPConnect is non-trivial so we are reducing the XPConnect-able calls. We might also try adding more “quickstubs” – code that short circuits the XPConnect bridge, making the call faster.

Finally, we are noticing slowdowns related to the Places (bookmarks and history) system. Likely to be SQLite file I/O related. Two examples are: during startup the Places system is initialized, and when Fennec loads the bookmark list. I’ll note that neither of these examples is noticeable at all on desktop machines.

The startup issue is caused by a XPCOM component being initialized and in turn, initializes the Places core system. It results in a 250 ms speed bump during startup. We are currently working on a fix for this issue. The bookmark list load time is slowed by accessing the bookmark system for information used to display in the list, for each bookmark. In a simple test using just 10 bookmarks, it can take almost 3 seconds to load the list. Luckily, we were able to avoid some of the calls to the bookmark system and have improved load time by almost 40%.

We already have several performance related patches ready to land for the next release. Also, just about all the performance improvements we make for Fennec on Maemo are directly applicable to Fennec on Windows Mobile – win/win!

Fennec Windows Mobile – Update

I previously reported that we found a memory-related problem in the Fennec Windows Mobile pre-alpha release. Bug 477956 was the primary place to track our efforts to fix the problem. However, it became clear that porting jemalloc to WinCE was the best way to handle the situation, so bug 478044 became the bug to watch. As you can see, we are in the process of getting the fix reviewed and landed.

Using our own memory allocator gives us much more flexibility and control. We can workaround the memory management limitations found in WinCE. The next version of WinCE makes some nice changes to memory management.

A few internal test builds have been made, and with a high level of confidence, we can say that the memory problems have been solved. Once we get the fix landed, you can expect new Fennec builds for Windows Mobile.

Fennec Windows Mobile Pre-Alpha Problems

When we released the Fennec pre-Alpha for Windows Mobile, we hoped it would help us find bugs that didn’t show up on our test devices. We knew there would be problems lurking around so we wanted to get a preview version into the hands of more testers. The good news is we found a showstopper! The bad news is the browser is basically useless for many people.

The Short Version

We are digging into the problem and have been able to reproduce it internally. It’s obviously a top priority and we will get a new version released as soon as we get a fix in place.

The Long Version

When Fennec loads, many people are left looking at the background checkerboard pattern. This appears to be memory related. Windows Mobile has some exciting restrictions around memory use. There are ways to get around the restrictions and that’s what we are working on. When we figure out the true cause and get a solution in place, we’ll be sure to blog the details.

Follow the bug to monitor our progress. We hope to have a new version out soon and you can help us find more of the other bugs.

Oh, one other issue that has come up a few times: Fennec for Windows Mobile is currently targeting ARMv6. So older ARMv5 devices won’t work in this release. We are working on that too.

Thanks for your patience and thanks for testing.

Fennec & Gestures

Felipe Gomes has been busy. We talked on IRC a short time ago about adding a gesture engine to Fennec. He made a video of the current version. The results are very cool. His work is being tracked in bug 476425. The engine is currently packaged as an extension, so you can play with it yourself. Just pull from Felipe’s repository and put the code inside your extensions folder in your profile.

Go digg it!

XULRunner 1.9.0.6

The newest official XULRunner has been released. XULRunner 1.9.0.6 matches the Firefox 3.0.6 release. For XULRunner developers, most of the changes in 1.9.0.6 are related to security fixes. You can also look at the full list of fixed bugs.

Runtimes
SDKs
Source tarball

Update: We now have XULRunner builds for Windows Mobile! XULRunner runtimes now exist for Windows, Windows Mobile, OS X, Linux and Maemo (a mobile Linux). Another XULRunner port is underway: Symbian OS (S60).

Want to get started building XULRunner applications? We have an article for that.

DOM Inspector for Fennec

DOM Inspector is a great tool for debugging XUL, HTML and CSS. DOM Inspector 2.0.3 now supports Fennec (1.0a1 – current). To install in Fennec:

  • Go to the Add-ons Manager “Get Add-ons” pane.
  • Type “dom inspector” into the search box.
  • Press the “Add to Fennec” button.

There is currently no visible UI (menu or toolbar) to launch DOM Inspector, but you can use CTRL+SHIFT+I to open the inspector window. Using DOM Inspector should make porting add-ons to Fennec a little easier. Tested on Fennec desktop and n810.

Fennec – The Inside Story

No, I’m not dishing dirt on Stuart. I started to put together some Fennec front-end documentation. Fennec is similar to Firefox, but very different at the same time. Some background information and discussion of the internals is probably a good thing.

I also pulled in some performance related guidelines, most of which I discussed in this post. The document will become the core of my FOSDEM Fennec talk. If you’re thinking of attending that talk, read the document first and come prepared with questions.

I want to add sections on JavaScript APIs and events available in Fennec, as well as some of the process flow. Add-on developers, in particular, should have a solid understanding of the internals. It will make porting your code easier.

FOSDEM 2009

I’ll be making my second trip to Brussels to take part in FOSDEM. I had a lot of fun last year and I’m looking forward to another great conference this year. I have two sessions in the Mozilla developer room this year:

  • Mobile/Fennec – My part of this talk will cover how Fennec is built, building add-ons for Fennec and some performance-related coding tips.
  • Embedding Mozilla – This talk will cover what’s been happening with the new Mozilla embedding APIs.

If you have ideas for topics you’d like me to cover in either of those sessions, let me know.

Talos for Mobile – The System Works!

Talos is the Mozilla performance testing system. Talos runs in conjunction with our continuous build system (Tinderbox). After every build completes, it is sent off to Talos for performance testing. Mobile has continuous builds for Maemo and Windows Mobile (not sure what’s up with mobile-wince-arm-dep-191). Recently, Talos was setup for the Maemo builds. We are collecting data for a few metrics. Tp3 (pageload time) is notably missing. Aki has it working on the staging server, so it should be available soon.

It’s pretty nice to see improvements like this one. However, we primarily monitor performance data for regressions (slow-downs). It didn’t take long before we found our first performance regression. One of our check-ins caused Ts (startup time) to increase about 350ms. We really want the check-in to stick, since it fixes some nasty focus bugs. We will probably need to rework the code a little to recover the Ts speed.

Thank you, Talos!

Fennec with tel: Support on Windows Mobile

Nino D’Aversa, a student at Seneca College, has been working on some Fennec Windows Mobile features. His latest blog post shows the progress he has made on Bug 465664, adding tel: link support. That’s right, click a tel: link and the dialer opens to make the call.

Nino has been doing a great job. He decided he wanted to start hacking on Fennec for his course projects (Yay Seneca!). His next goal is adding a Geolocation implementation to Fennec via Windows Mobile GPS support.