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++)

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mayankleoboy1, Assigned: emilio)

References

()

Details

Attachments

(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 http://themaninblue.com/experiment/eclipse/
  3. Move the mouse around

Actual results:

animation is smooth. However, the gecko profiler shows quite a lot of time spent in styling.

https://perfht.ml/2SdP9S6 (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 : https://perfht.ml/2ScGq2z

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
more.

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

\o/

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: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=246826943&repo=autoland&lineNumber=993

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

Flags: needinfo?(emilio)
Status: NEW → RESOLVED
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.