Posted in startup on September 20th, 2011 14 Comments »
Firefox 7 features improved startup speed. Our research has shown that most OSes are not capable of starting large programs efficiently (see my older blog entries). As a result, Firefox 7 will explicitly tell the OS to aggressively preload our xul.dll/libxul.so/XUL library before passing it on to the runtime linker. This marks the productization of [...]
Posted in startup on April 26th, 2011 4 Comments »
Until recently our state of the art method for measuring startup was to subtract a timestamp passed via commandline from a new Date() timestamp within a <script> tag. Vlad pioneered this approach, me and others adopted it. Turns out there are two problems with this approach: It is cumbersome, especially on Windows where there is [...]
Posted in startup on February 9th, 2011 8 Comments »
Internet as of late have been obsessing over magically short patches that improve performance _ times(probably as a result of LKML cgroups patch from a few weeks ago). So my work in bug 627591 got picked up in all kinds of news sources(mostly due to @limi’s manlove). Apparently all that internet fame is good for [...]
Posted in startup on December 29th, 2010 7 Comments »
In addition to slow font enumeration, we were suffering from a similar problem: slow plugin enumeration. Just as with fonts, the plugin enumeration code is different on every platform. Unlike the font situation, plugin enumeration is done completely within our code(ie easy to fix). Plugin enumeration is often triggered by JavaScript code (for example by [...]
Posted in startup on December 21st, 2010 6 Comments »
Imagine a typical Firefox user who starts their Windows computer in order to surf the web. First app they launch is Firefox 4. Turned out that on systems that support hardware-acceleration for 2D graphics, Firefox 4 takes minutes to startup. WTF? XPerf-aided investigation showed that, the Windows font enumeration code causes us to do 30x [...]
Posted in startup on November 23rd, 2010 No Comments »
There is a common fallacy that since linkers and compilers are written by really smart people, there aren’t any huge performance wins left in the toolchain. My theory is that the efficiency of any given codebase varies inversely with the number of people who tried to optimize it. I have long complained of suboptimal binaries [...]
Posted in startup on October 4th, 2010 9 Comments »
I spent last week trying to reproduce slow startup on Windows. Some users were reporting >30 second startup, supernova_00 has been feeding me xperf traces on IRC reproducing slow startups. Startup Bugs Turns out that if a website uses non-standard font names this can trigger Firefox to start parsing every single font on the system, [...]
Posted in startup on July 30th, 2010 1 Comment »
I was digging through a MSVC++ map file for xul.dll. Turns out MSVC++ isn’t as naive about virtual initializers as the GNU toolchain. Initializers are all laid out next to each other. Same goes for what looks like finalizers and exception unwinding stuff. Initializers have an __E prefix and look like this: 0001:0089b470 ??__E?config@AvmCore@avmplus@@2UConfig@nanojit@@A@@YAXXZ 1089c470 [...]
Posted in startup on July 22nd, 2010 29 Comments »
Files are considered fragmented when they aren’t laid out in a continuous chunk on disk. This causes extra seeks even if the file is being read sequentially. I was discussing startup over dinner, someone asked about how much of an issue fragmentation is in Firefox. Early on I decided to pretend that fragmentation does not [...]
Posted in startup on May 27th, 2010 10 Comments »
This post is a result of debugging bug 561842. Turns out one needs to go far beyond lumping libraries together to reap startup benefits. I made a pdf to illustrate the cost centers of loading libxul.so (the essence of Firefox). With Icegrind I demonstrated that better binary layout can significantly improve application startup. However I [...]