mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Auto merge of #15535 - froydnj:global-style-thread-pool, r=bholley
geckolib: use a global thread pool for styling By having a single thread pool, rather than one per document, we use less memory. This addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1324250. This may be obvious to an experienced Rust programmer, but I went with raw pointers because trying to use `Option` global variables resulted in complaints about turning on feature flags in nightly Rust. Since this is for stylo, nightly features are not appropriate here. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15535) <!-- Reviewable:end -->
This commit is contained in:
commit
56a99577b3
9 changed files with 60 additions and 47 deletions
|
@ -22,6 +22,7 @@ libc = "0.2"
|
|||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
num_cpus = "1.1.0"
|
||||
parking_lot = "0.3"
|
||||
rayon = "0.6"
|
||||
selectors = {path = "../../../components/selectors"}
|
||||
servo_url = {path = "../../../components/url"}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
|
|
|
@ -8,8 +8,11 @@ extern crate cssparser;
|
|||
extern crate env_logger;
|
||||
extern crate euclid;
|
||||
extern crate geckoservo;
|
||||
#[macro_use] extern crate lazy_static;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate num_cpus;
|
||||
extern crate parking_lot;
|
||||
extern crate rayon;
|
||||
extern crate selectors;
|
||||
extern crate servo_url;
|
||||
extern crate style;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue