Marek Gibney

Browser Startup Speed

For some reason, when I start a browser, my muscle memory always seems to prefer Chromium over Firefox. I had the feeling it is because Chromium starts up faster. To figure out if that is true or just an illusion - and if true, to what extend - I wrote a simple one-liner to test that assumption. It tests how long it takes a browser to start and send the first request. Just fire off this oneliner:

For Firefox:
firefox 127.0.0.1:8000 2>/dev/null & time echo x | nc -N -l 8000
For Chromium:
chromium-browser 127.0.0.1:8000 2>/dev/null & time echo x | nc -N -l 8000
To delete disk cache before the start:
echo 3 > /proc/sys/vm/drop_caches
These are my results (2019-11-07):
After a reboot:
Firefox: 6.4s
Chromium: 1.5s

On Empty Cache:
Firefox:  1.4s
Chromium: 1.3s
So Firefox starts way slower after a reboot. And then Firefox and Chromium both are similarly fast on later runs. Firefox also slow at random times during the day which are not immediately after a reboot. Have not yet figured out when exactly that happens. Maybe when something other then the disk cache gets discarded from memory.