Firefox Startup Performance Weekly Roundup
August 29, 2009
The Firefox and Platform teams were both onsite at the Mountain View office this week, getting some face-to-face time. There was a lot of great conversation and productive interaction between groups. The team of people focusing on application startup time went over all the bugs marked [ts], discussing and prioritizing.
- Startup Timeline: While the timeline hasn’t landed yet, you can still take advantage of it: David Dahl has an instrumented build, and will provide timeline info for you if you have an area you want to know about. More details on his post.
- PGO for Places, mozStorage and SQLite: Still blocking on Rel-Eng fixing bug 486783. I need to connect with John O’Duinn and see if we can move this up in the schedule.
- JAR Transition: Taras landed bug 508421 which allows anything in jar:toolkit.jar!/res/* to be loaded via resource://gre-resources/. This makes it very easy to move individual files into a jar, and access them in a fairly transparent way from code. This helps cold startup, as well as page-load time. He posted a HOWTO for taking advantage of this.
- JS Component Combining: No progress this week.
- Static Analysis: Bug 506128 is wrapping up. David need to file a bug with the final log of named-yet-uncalled functions.
- Dirty Profile Testing: No progress. Need to list scenarios, file bugs for each, generate Talos config patches and profile data, and then move it into Rel-Eng territory. Also, need to get a separate Tinderbox tree, since it’s going to cause a bazillion new columns.
- Cold Startup Testing: Drew Willcoxon is working on bug 510587, to create a new Ts that measures cold startup. He’s got patches up for adding head/tail file support to Talos. A new issue that cropped up this week is that the simulated cold-startup methods on Windows don’t appear to work very well, so he’s looking for advice there, as well as looking into reboot support in Talos.
- Joel Reymont noticed that Safari’s libs are loaded from the OS’s warm cache, and ours are not! In bug 513076 he’s investigating whether or not we can get our dynamic libraries in there as well.
- Ryan Flint started looking into taking NSS and spellcheck initialization out of the startup path, and found that Shark says they’re not in it on a regular startup! However, I found a recent bug from Vlad talking about crazy stuff NSS does at startup (aside from the temp file dir skullduggery), so need to figure out how he’s seeing that, and why Shark isn’t.
- CSS Parsing Time: Bug 91242 says CSS parsing is 5.5% of startup time… in 2001. Taras has mentioned several times that it’s still significant, so asked him for numbers for contemporary builds. Zack Weinberg is working on speeding up parsing using a machine generated lexer, need to get numbers from him on what kind of a difference it makes in parse time.
And if you haven’t yet, read through Taras’ annotated log of files opened at startup. If you see anything that can be delayed, or want to dig into why a certain file is loaded, let me know! Or just file a bug and put “[ts]” in the bug’s status whiteboard.
Firefox Startup Performance
August 8, 2009
A team of Firefox developers and others are working on making Firefox startup faster. Per Mike Beltzner’s post, we’ll be updating our status weekly. Here’s the status of what the team did this week, as well as pointers to some other work going on. The list here highlights major points, but is not complete. Many more details of these projects, as well as other areas for investigation can be found on the wiki page, and on Vlad and Taras’ blogs.
Status
- XPCOM component combining (Dietrich): Manually combined a bunch of files, and found improvements in sub 100ms, but varying results, so going to check-in to the Places branch temporarily to get better numbers. Writing a script to hook into the build system to knit the components together automatically, but need better numbers before going further.
- Enabling PGO for SQLite, mozStorage and Places (Dietrich): Made a patch to re-enable PGO for these, and checked into the Places branch. Currently there are unit tests failing, but they look unrelated. Need to trigger more runs to ensure that’s the case. Performance numbers are not definitive, need more runs to complete.
- Dead code hunting with JSHydra (DDahl): Have basic code for function finding, making progress on code for building JS context for chrome URIs. (props for help from taras, humph, jcranmer in #static)
- Combining XPT files on Mac (Drew): Potentially significant gain of a few seconds on startup, investigation continuing.
- Startup Timeline (Vlad, DDahl): This is still in review.
- Combining jar files (Taras): This is ready to check-in (again).
Next Steps
- Confirm numbers for combining JS components, finish script to automate combining, work with Ted to hook it into the packaging process, see if any modules can be combined.
- Find out why tests are failing for PGO and quantify gain/loss when the slow tinderboxen finally report some numbers.
- Get the startup timeline reviewed, landed and start adding markers and performing analysis.
- Investigate why wall-clock time of combined jars doesn’t decrease.
- Get full browser JS context working in JSHydra, write the uncalled-function script, file dead-code bugs, get it plugged into continuous integration on tinderbox.
- Get bug 475289 and bug 499123 landed, further reducing IO and component registration time spent at startup.


