Firefox 4 Patch Makes Startup on Windows to 2x Faster

Taras Glek, on bugzilla.mozilla.org, found a way to trick Windows into loading Firefox faster by using a simple patch:We page in most of xul.dll and mozjs.dll. So i figured why not try lazy-linking libxul and preloading it. Turned out lazylinking didnt make any difference, but preloading seems to consistently shave up 2seconds of startup on […]

Taras Glek, on bugzilla.mozilla.org, found a way to trick Windows into loading Firefox faster by using a simple patch:

We page in most of xul.dll and mozjs.dll. So i figured why not try lazy-linking libxul and preloading it. Turned out lazylinking didnt make any difference, but preloading seems to consistently shave up 2seconds of startup on my profile(40%).

Basic idea is that the sequential flag + bull**** read tricks windows into reading xul in Mb chunks instead of stupid 32k(or smaller) ones. Have to do it this way because there is no fadvise() on Windows(that I know of) A big sequential read cuts down on a lot of seeks.

Many users are reporting faster boot times, with load time cut by 50% on slower drives. If this work-around proves to work for the masses, it may be rolled out in the next version of Firefox.

Currently, there are users looking to refine the process to make it even more efficient.

[tags]patch[/tags]

[Source]