Closed Bug 1529002 Opened 8 months ago Closed 5 months ago

Eclipse demo spends 30-40ms styling 300 elements (transform list conversion from rust to C++)


(Core :: CSS Parsing and Computation, defect, P3)




Tracking Status
firefox68 --- fixed


(Reporter: mayankleoboy1, Assigned: emilio)





(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

  1. enable WR, picture caching
  2. Go to
  3. Move the mouse around

Actual results:

animation is smooth. However, the gecko profiler shows quite a lot of time spent in styling. (with parallel styling disabled)

Expected results:

not so?
I am not sure how real world this is, or if the time spent is expected.
Feel free to RESOLVED INVALID this bug.

Attached file aboutsupport.txt

Emilio, WDYT?

(WR and picture caching are enabled because without WR, demo is super slow, and all the time is spent in gfx stuff)

Flags: needinfo?(emilio)
Component: General → CSS Parsing and Computation

and this is profile with parallel styling :

Ugh, most of the time is spent in malloc() / free(), which is unfortunate.

I think this is not too terrible, but all the work I'm doing to switch us to not having to convert from the rust representation to the C++ representation should help quite a bit here.

Unfortunately transform is one of the toughest ones to crack though :)

Flags: needinfo?(emilio)
Priority: -- → P3
Summary: Eclipse demo spends 30-40ms styling 300 elements → Eclipse demo spends 30-40ms styling 300 elements (transform list conversion from rust to C++)
Assignee: nobody → emilio

This avoid the expensive conversion, and cleans up a bunch.

Further cleanup is possible, just not done yet to avoid growing the patch even

We need this to auto-generate the copy-constructor for TransformOperation,
without which the patch wouldn't build.


Blocks: 1551991

New failure "Assertion failure: _0.ptr->data.header.header == kArcSliceCanary (Uh?), at z:/build/build/src/obj-firefox/dist/include\mozilla/ServoStyleConstsInlines.h:118"

Failure link:

Yeah, see bug 1550554 comment 11 for the explanation. Same mistake.

Flags: needinfo?(emilio)
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Duplicate of this bug: 1457033
You need to log in before you can comment on or make changes to this bug.