I mean the second process launch. I startup the process (on Linux, using any version 3.x), it takes 5 seconds to load. Then I kill the process. There is no instance of firefox running. I startup firefox a second or third or forth time... and it always starts very quickly.

My question: why? Are we talking caching of whatever files firefox depends on? Do I need to defragment my hard disk? Is firefox running through various webpages its got cached locally (including its persistent web history)? Or does it cache something in its initialization process (so that the second process launch -- not the second window or tab launch -- note, that isn't the question) that doesn't persist through reboot? Or is there something with caching in other parts of the memory hierarchy?

I could try to find out. But I honestly don't care all that much (it's not like Chrome is available in a stable format with Flash on Linux, afaik). Not being too into the alternatives (opera, or webkit/khtml solutions, etc.), I don't particularly have a choice. Just curious.


Firefox is still cached in RAM, that's what makes it so fast the second time around. If you'd wait a while before starting it the second time it wouldn't be that fast. The same thing happens in Windows and Mac OS X, not just Linux.

  • 3
    That's a gross simplification. "Firefox" itself is not cached, but many things it accesses on startup are indeed cached. – Nickolay Oct 8 '09 at 7:11
  • There was no real point in going into all the details. I know how it works, I've studied this in college. Would you agree with me that the general idea in my answer is valid? – alex Oct 8 '09 at 7:13
  • Stuff what firefox needs to load is cached, firefox is cached, when you get down to it it answer's the OP's question (they seem to know what they're talking about), and doesn't waste words. +1 – Phoshi Oct 8 '09 at 8:16
  • alex: Sorry, I guess for me the basic answer (something somewhere is cached) is obvious, so I expected the OP to want to know the particulars :) – Nickolay Oct 8 '09 at 11:14
  • @nickolay no problem :). I thought that it was a bit basic as well, but since it got so many upvotes and it actually got accepted, I decided the explanation was probably enough for what the OP wanted. Sometimes going into to many details can actually be worse :) – alex Oct 8 '09 at 11:22

Some programs use a lot of libraries (dll's) which must be loaded before they can run. After the program terminates, the operating system leaves them in memory in case they might be used again. They will be "flushed out" if others need to load in their place. So yes, this is a form of caching.

Some programs, like Open Office exhibit this behavior, and even come with "quick start" feature which preloads most of the necessary files at startup, even before you run the application.


In Linux, unused RAM is wasted RAM so pretty much all recently opened applications are cached exactly for this purpose.

  • 1
    It's the same thing in any OS :). – alex Oct 6 '09 at 6:25
  • in essence every OS does this, but there are several differences in the implementation. that's a larger discussion tho. – Roy Rico Oct 6 '09 at 7:13
  • It really is a larger discussion. That's why I still have nightmares from my college years :) – alex Oct 6 '09 at 8:14

You might be interested in the startup performance work that's underway for Firefox "3.6" (the next after 3.5). This blog has a number of summary posts on this: http://autonome.wordpress.com/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy