I’ve been focusing more on Jetpack development this quarter, but will still be posting performance round-ups regularly here. In fact, here’s one now:
- Taras Glek continues to blog his progress on improving the binaries we ship, talking about how reordering binaries improves memory use as well as load time, leveraging GCC’s PGO for fast startup, and finally about Icegrind, his Valgrind plugin that generates a log of the order of access to mmap’d files.
- I finished and checked-in my changes to the Tinderbox Pushlog, adding a new feature that provides at-a-glance comparison in performance test results between any two pushes on the page (screenshot). It will go live next time Marcus pushes changes out to his server. But he’s not online at the moment, so I don’t know when this feature will go live. Heh, it went live moments after I published this post.
- Heather Arthur and Clint Talbert are working on a project to add performance data to Addons.mozilla.org for extensions. They’re starting with the effect of a given extension on Firefox startup time. Follow along on the bug, or watch project Dirty Harry on Github.
- Improving the AMO extension validator: AMO scans uploaded extensions and reports problems to the authors. For performance best-practices, we should at least warn the authors if possible if their add-on is doing something that’ll make Firefox slow. This bug is for warning about add-ons that don’t have their content in a JAR file. If you see any thing in the best practices guide that can be statically detected, please file a bug for it here.
If you have any other performance-related bugs, blog posts, anecdotes or other tomfoolery, post it in the comments!
As I mentioned in my previous update, the scope of these updates has expanded beyond start-up time. That said, I can’t keep track of everything! So if you have an update, email it to me if you want it in the post, or just add it in the comments.
- First, I just have to say that Marco’s fix for bug 542943 has changed the way I think about browser restarts, removing the fear entirely. It turns out that, for me anyway, the majority of the slowness involved in restarting was waiting for the process to exit. After Marco’s landing, it’s nearly instantaneous.
- While I was away, Taras blogged nearly daily about his findings while working on Linux code locality. He first posted a graph of I/O from library loading, then a long post about why library loading sucks on Linux, followed by some findings regarding madvise and prelink, finally posting about linker inefficiencies and SuSE’s workaround.
- Mike Wu and others are moving forward on the “omnijar” project, which moves most of the core application files into a single JAR file. Taras described it as “extreme filesystem makeover”, and found ~10% start-up improvement with this approach on the desktop.
- Clint Talbert and Heather Arthur are beginning work on a project that measures add-on performance, that will hook into AMO to show developers how their add-ons perform.
- Drew Willcoxon got r+ on bug 536893 to allow asynchronous opening of Places query results. Once we start using the feature, expect bookmark and history UI to get snappier!
- Taras got review on bug 516085, which consolidates access to core services that currently accessed hundreds of thousands of times during a browsing session.
- A bunch of people have added tips to the add-on performance “best practices” document. I’ll be cleaning it up and moving it to MDC soon.
- While the tinderbox pushlog is fantastic for viewing per-checkin results, and a broader view of tree activity, it doesn’t provide any facility for comparing the results of performance tests between landings. So I spent some time this week writing an addition that allows you to select any two pushes, and view a comparison table showing the difference in performance across all tests on all operating systems for those revisions. I’ll clean it up, and try to get it deployed, but regardless will make it available as a Jetpack or Greasemonkey script sometime next week.
For more info:
- Startup performance activity is tracked here.
- Add-on performance efforts are being tracked on this page.
- Weekly performance results for all measurements are available on the snapshot, and trends available on the dashboard.
A couple of notices: First, I’m going to start including various performance-related items in these posts that aren’t purely about startup time. There’s a whole bunch of activity happening that isn’t really rolled up anywhere, so it might as well be here. Second, I’ll be out on vacation in Florida next week, so there will not be a status update.
- Last week I forgot to add that Marco Bonardo landed bug 542943, which removed a hash of all bookmarks that stayed resident for the lifetime of the application. This resulted in a 97% improvement in shutdown time for our test of a very large bookmarks+history collection.
- Ted’s taken over the static build project, and has new patches up.
- Taras is working on Linux code locality via a Valgrind plugin he’s writing, with help from those folks.
- At the platform work week Taras talked to Ehsan, who it turns out had a bunch of ideas for improving startup there. I’ve filed bugs from Ehsan’s notes for better Windows code locality, binding DLL function addresses to the executable, DLL rebasing, and DLL lazy-loading.
- The add-on performance “best practices” document is getting bigger and better. If you have ideas for improving add-on performance, please add them to the doc!
- All of our add-on performance efforts are being tracked centrally on this page. If you want to get involved, hop on one of those bugs. If you want to stay updated, “watch” that page and you’ll get emails whenever it’s updated.
- I’ve updated the main Performance wiki page. The top sections are now up to date. Next I’ll be updating the testing and reference sections, and breaking out the task-specific content and moving it to an updated table of performance activities, like we currently have for startup, addons, etc. When the page is more manageable, I’ll remove the TOC that’s pushing everything below the fold.
- As usual, the table of active startup performance activity is here.
No update on the ongoing code projects this week. However, we investigated the extension performance work I mentioned last week, and got a conversation going, with posts by Taras, Asa and myself. I’ve listed the various ideas and approaches that came out of those posts and comments here.
I spent the week on-site at Mozilla HQ in Mountain View, which was great.
- Talked with Bob Moss and others about expanding our startup tests to cover a variety of startup scenarios.
- Spent some time tracing file IO with the top 10 extensions on AMO installed, comparing it to an empty profile (empty, with extensions) for a bug Taras filed about extension-caused file IO.
- I also traced shell calls in the startup path, and found some weirdness, and yeah there are a bunch more calls with the top 10 extensions installed (empty, with extensions). Things like this should be “advertised” on extensions’ pages on AMO. I’m pretty sure there’s already some movement towards Talos testing extensions and posting results on AMO. I’ll file a bug for getting things like this watched as well.
- Taras has been making progress using Valgrind to get the function and data ordering sequence for improving code locality in our binaries.
- Ryan patched and landed a change to increase the buffer size used when reading in JSON files (something the search service does during startup).
Instead of copying around the table of high-priority startup projects, it’s now centrally located and updated on the Startup wiki page. A couple of front-end optimizations landed this week:
- Neil landed bug 354048 to not rebuild toolbars at startup.
- Ryan landed bug 522842 for the search service to not send notifications until all engines are loaded.
I’ll be in Mountain View all next week for the Firefox work-week.
Other than that, no major updates:
- Zack found surprisingly large performance wins just from deCOMtamination patches in his CSS work. If you want to help out, bug 105431 is the deCOM tracker bug, and bug 545052 is about building tools for automating deCOMtamination.
- Static build: Still in reviews, need to figure out approach to binary tests on the tinderbox.
- Ben’s fastload cache replacement is still waiting on first-review from Ben Smedberg.
- Bug 354048 to not rebuild toolbars at startup, still cycling through reviews.