6

Can any body tell me whether Firefox creates a new thread per tab?

Thread per instance of Firefox?

And, what is the maximum number of threads limit for Firefox?

1
  • 1
    Data point: Firefox with eight tabs (one window) on my Mac has 18 threads now. Opened four more tabs, number of threads actually decreased to 17.
    – Thilo
    Sep 23, 2010 at 12:24

2 Answers 2

3

I don't think there is a relationship to threads to tabs. Firefox most likely uses a thread pool to load a web page then returns the thread to the pool once the page is loaded. Extra elements like animated gifs and plugins like Flash probably require a couple dedicated threads while the page is open (or perhaps, only if the tab is in focus).

Chrome is one process per tab/plugin, which means you can specifically kill the process if a tab acts up. Processes are different from threads, since each process can contain many threads themselves.

The best place to learn more about this would be on the Mozilla development forums. But for the sake of simplicity, there is no way to "kill" a thread if a tab acts up, like Thilo said, this virtue is reserved for Google's Chrome.

1

Firefox 54 Finally Supports Multithreading, May Beat Chrome on RAM Usage

It seems to combined multi-process and multi-thread. Although this could save plenty of resources, I think it would also bring some secure problems, and I would like to study with it further.

1
  • I have checked it, it's multi-process & multi-thread on linux, while still multi-process on windows.
    – weir007
    Nov 28, 2019 at 2:32

You must log in to answer this question.