Closed
Bug 1324250
Opened 8 years ago
Closed 8 years ago
stylo: Use a global thread pool, instead of one per document.
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: emilio, Assigned: froydnj)
References
(Blocks 1 open bug)
Details
Right now stylo spawns a thread pool per document it styles. That can be pretty inefficient and memory-consuming.
We should switch to use one global thread pool, and use that for all the documents we style.
This is probably easier with the scoped TLS stuff Bobby is working on right now.
Comment 1•8 years ago
|
||
Emilio, you should probably coordinate with billm about the Quantum DOM team's plans for task scheduling and prioritization. To be effective, a global thread pool would need to know about all threads, Rust/Rayon and C++, and task priorities.
Flags: needinfo?(emilio+bugs)
Comment 2•8 years ago
|
||
That is probably not necessary, because we block the main thread while doing restyling, and thus it is just about not creating too many thread pools. There is nothing to do with scheduling between different documents which are basically all run in the main thread.
Reporter | ||
Comment 3•8 years ago
|
||
Yeah, what Xidorn said, a single stylo thread pool per process is probably acceptable.
If that ends up being not acceptable we may want to figure out a way to reuse other thread pools around, but that'd be a big effort that is probably not worth without a clear reason.
Flags: needinfo?(emilio+bugs)
Comment 4•8 years ago
|
||
We should be able to able to spin up the appropriate thread pool somewhere in nsLayoutStatics::Initialize.
NI Manish, who was looking for things to do. :-)
Flags: needinfo?(manishearth)
Updated•8 years ago
|
Flags: needinfo?(manishearth)
![]() |
Assignee | |
Updated•8 years ago
|
Blocks: stylo-memory
![]() |
Assignee | |
Updated•8 years ago
|
Assignee: nobody → nfroyd
Comment 5•8 years ago
|
||
This was fixed in https://github.com/servo/servo/pull/15535
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•