What's the maximum number of threads a browser can execute in an instance?

Castamir

BANNED
Joined
Sep 4, 2019
Messages
1,200
Reaction score
1,058
What's the maximum number of threads a browser can execute in an instance while loading a single page? I don't mean tabs, I meant resources on a single page.
Please, the current browser versions "actively" in use should be considered.
 
I don't really undertand your question. You mean how many threads that parse resources? How many threads that can be run via JS in a single browser page?
 
Do you mean creating service workers with JavaScript, so you want to know how much you can abuse them? Or do you have a ton of different scripts and fear the browser will take too long during the loading phase?
 
I don't really undertand your question. You mean how many threads that parse resources? How many threads that can be run via JS in a single browser page?
Do you mean creating service workers with JavaScript, so you want to know how much you can abuse them? Or do you have a ton of different scripts and fear the browser will take too long during the loading phase?
What I meant is prefetches, preloads and preconnects of CSS, JS and analytics tools as well other external resources.
 
What's the maximum number of threads a browser can execute in an instance while loading a single page? I don't mean tabs, I meant resources on a single page.
Please, the current browser versions "actively" in use should be considered.
Do you mean l"oading" as in rendering the page from the html/CSS files or "loading" As in downloading the assets?

There's no "maximum number of threads" for any software system. Be it an os, a browser or your typical desktop app. The number of threads it can start will depend on the amount of memory the system gets allocated.

On Chromium for example, the maximum number of threads chromium can spawn is "however as many 1.4gb of memory can afford". 1.4gb is the max memory limit of Chromium on 64bit systems by default. So, chromium can have 10 threads each taking about 100mb of memory. Or literally hundreds of threads each consuming anywhere from a few kilobytes to a mb or more.

All popular browsers will use a multi-process architecture. On chromium, there are 4 of them. The browser process (for the browser window), the renderer, v8 and IPC processes.

The renderer is what is responsible for rendering your page. It has a main thread Blink::main() a background thread for IO/IPC and several worker threads that render your page. Most of the bulk of operations is done by the main thread and so Blink is mostly single threaded.
https://chromium.googlesource.com/c...hedulingInBlink.md#off-main-thread-scheduling
 
1588856408604


This should answer your question, but I think Chrome has increased some of those values after version 50.
 
Do you mean l"oading" as in rendering the page from the html/CSS files or "loading" As in downloading the assets?

There's no "maximum number of threads" for any software system. Be it an os, a browser or your typical desktop app. The number of threads it can start will depend on the amount of memory the system gets allocated.

On Chromium for example, the maximum number of threads chromium can spawn is "however as many 1.4gb of memory can afford". 1.4gb is the max memory limit of Chromium on 64bit systems by default. So, chromium can have 10 threads each taking about 100mb of memory. Or literally hundreds of threads each consuming anywhere from a few kilobytes to a mb or more.

All popular browsers will use a multi-process architecture. On chromium, there are 4 of them. The browser process (for the browser window), the renderer, v8 and IPC processes.

The renderer is what is responsible for rendering your page. It has a main thread Blink::main() a background thread for IO/IPC and several worker threads that render your page. Most of the bulk of operations is done by the main thread and so Blink is mostly single threaded.
https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/scheduler/TaskSchedulingInBlink.md#off-main-thread-scheduling

1588856408604


This should answer your question, but I think Chrome has increased some of those values after version 50.
Both of these answers are very useful and awesome. Thanks a lot.
 
Back
Top