Add prefs to limit threadpool sizes (#34478)

* Add prefs to limit threadpool sizes

Add preferences to control the size of threadpools,
so that we can easily reduce the amount of runtime
threads and test which pools benefit from more
threads.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Add pref for Webrender threadpool

Add a preference to limit the size of the webrender threadpool.
Note: WebRender by default calls hooks which register the threads with
a profiler instance that the embedder can register with webrender.
Servo currently doesn't register such a profiler with webrender,
but in the future we might also want to profile the
webrender threadpool.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2024-12-07 06:25:17 +01:00 committed by GitHub
parent 4242ff9626
commit 68a27946bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 82 additions and 14 deletions

View file

@ -102,7 +102,6 @@ surfman = { workspace = true, features = ["sm-angle-default"] }
serde_json = { workspace = true }
webxr = { workspace = true, optional = true }
[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
# For optional feature servo_allocator/use-system-allocator
servo_allocator = { path = "../../components/allocator" }