javascript contador Skip to content

Firefox finally has multithreading, the biggest change in its history

Firefox says goodbye to Windows XP and Vista: the end of support is near

Firefox says goodbye to Windows XP and Vista: the end of support is near

The multithreaded in Firefox is already here. It is not a joke. Really good. Really.

You do not believe me? I don’t blame you, considering we’ve been talking about multithreading in Firefox for years, to no avail. Meanwhile, Chrome made multithreading its foundation, and it shows.

Mind you, I’m not saying that completely changing the way a program works is easy, far from it. But I know I have been waiting since 2009, when this functionality was first announced.

What is multithreading

If you don’t know what I’m talking about, let’s start with the basics. Each core that has a processor is capable of working on a single process at the same time (There are exceptions, but we will leave them aside for now). Typically, when a program runs, it occupies a process, or thread, that is passed to the processor to do the work it needs to do.

So if you have a single core processor, you can only run one process at a time. Now if we have a processor with two cores, we can do two things at the same time. Simple, right?

But now the problem is that the program only occupies one process, one thread, so while you run the program with one kernel, the other one stays idle, which is a waste. Here enter programs with multithreading, or multithreading.

Chrome is one of the most famous programs that uses multithreading, turning every tab you open into a new process, and the truth is that you get the most out of this technology.

Thanks to the multithreading, each tab is completely independent, so if a website gets caught, it does not affect the rest and you can continue browsing as always. It also increases security, since allows a sandbox system whereby each process has limitations that prevent an attacker from taking advantage of a bug to access our system.

The multiprocess in Firefox is finally here

Why does Firefox not have multithreading? Because Chrome had the advantage that it was designed from scratch with this technology.; on the other hand, when Firefox was created, nobody thought that the multithreading would arrive so soon, and the code base is that of a program that only takes advantage of one process.

So Mozilla has had to work very hard for many years on the Electrolysis project, basically channelizing the program and remaking it as it could. For example, the browser component that was in charge of loading images was originally shared by all open tabs. Including multithreading is not as simple as creating a new process for each component.That would only create excessive redundancy.

That’s what Mozilla has been up to all this time, parsing each component and making sure it can work in a multithreaded environment without consuming too much resources or messing up completely. And finally, it seems that these efforts have paid off.

Firefox 48 already includes multithreading, and according to Mozilla, is the biggest change the program has ever received. And best of all, at first you will not notice, because the program itself has not changed anything compared to version 47 that has been released this week.

Electrolysis changes are internal, and we will notice them in performance (especially if we have a processor with many cores), in stability and in security. The initial version of Electrolysis divides Firefox in two, on the one hand the interface and on the other the process of the content, and it will be enough to prevent the entire program from hanging when a website has a problem, but it is only the beginning.

Multithreaded Firefox 48 arriving in the first week of August, but You can now install it in beta version if you want to try the improvement that multithreading entails. It is expected that later today it will be available on the official Firefox Beta page.