Open
Bug 1424346
Opened 8 years ago
Updated 3 years ago
MotionMark spends a lot of time reallocating and freeing memory while parsing transform properties
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox59 | --- | affected |
People
(Reporter: jdm, Unassigned)
Details
https://perf-html.io/public/8c31f30607c2ac6bb8c62cbde7ac2d2ac0daa704/calltree/?hiddenThreads=5-6-7-8&thread=9&threadOrder=0-3-4-5-6-7-8-9-2-1&transforms=ff-127~mcn-combined-zvA2Si~mcn-combined-zvA2CFp&v=2
The profile shows a significant amount of time under set_transform in the CSS parser for the transform property value. Under glue::set_property there is a reserve call, and under declaration_block::push there's arena_dalloc. The transform property is being set every single frame by the benchmark; is there a way we could do less allocation by reusing values somehow?
Reporter | ||
Comment 1•8 years ago
|
||
The reserve occurs in declaration_block::push, specifically.
Comment 2•8 years ago
|
||
(In reply to Josh Matthews [:jdm] from comment #1)
> The reserve occurs in declaration_block::push, specifically.
You mean declaration_block::extend, right?
If so, we can just nix this one, I'd think... The issue is that whenever the declaration block is mutated, we clone it, and rust uses the exact capacity, so the next frame we go again and grow it again, and so on...
Re. transform being super-slow to set and such, I think my best bet is just generating the style structs from rust when the old style system is gone (I noted it in https://public.etherpad-mozilla.org/p/post-stylo-stuff).
We can hack around transform, somehow in the meantime, I guess...
Comment 3•8 years ago
|
||
https://github.com/servo/servo/pull/19530 should help with that reserve() call.
Updated•7 years ago
|
Priority: -- → P1
Updated•7 years ago
|
Priority: P1 → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•