Posted in Uncategorized on April 20th, 2010 Comments Off
I landed the mozilla::services bug around the same time as Gavin announced the Services.jsm equivalent. Services.jsm came a pleasant surprise to me, it’s nice to have API symmetry. mozilla::services namespace provides a fast C++ way to refer to common services. This replaces a myriad layers of indirection that happened in the XPCOM GetService() call. Too [...]
Posted in performance, startup on April 19th, 2010 17 Comments »
Last week I learned about how Windows handles page faults backed by files (specifically xul.dll). I already knew that Linux was suboptimal in this area, perhaps the clever people at Redmond did better. Shaver pointed me at xperf, which is sort of like the new Linux perf tools. Xperf rocks in that it can capture [...]
Posted in startup, Uncategorized on April 12th, 2010 13 Comments »
Magic of GCC PGO On Friday I finally got gold to produce a prelinkable static binary(bug). I also got around to trying out GCC profile-guided-optimization with the debloatifying -freorder-blocks-and-partition option. This option breaks up every profiled function into cold and hot “functions”. It then lumps all of the hot functions together. PGO performance is amazingly [...]
Posted in Uncategorized on April 7th, 2010 7 Comments »
Most program binaries are laid out with little to no regard to how programs get loaded from disk. This disconnect between compile-time and runtime behaviour of binaries imposes a significant performance penalty to on large applications such as browsers, office suites, etc. It is incredibly difficult to observe both the cause (ie calling a random [...]
Posted in Uncategorized on April 5th, 2010 10 Comments »
As I explained before, loading binaries from disk sucks. Aside from switching glibc to use madvise/fadvise, what can application developers do to minimize this suckyness? I am going to start with numbers to give an idea of the magnitudes involved here. I’m still using my 1.8ghz core2duo laptop with a 7200 200GB harddrive. Time(ms) # [...]