Material design page is 4x-5x slower to load in Nightly compared to Chrome
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: emilio)
References
()
Details
Attachments
(3 files)
Go to https://m3.material.io/theme-builder#/dynamic
The page will take some time to load. Bear with it.
Click on the button on the top of the page that says "Custom"
Nightly(sequential styling) : https://share.firefox.dev/41dtzBJ (wall clock time is ~8 seconds)
Chrome: Wall clock time is ~2 seconds.
WE should be faster, if possible.
Reporter | ||
Comment 1•2 years ago
|
||
Hi Emilio. Wonder what you think about this page :)
Assignee | ||
Comment 2•2 years ago
|
||
Ugh, so this page is doing something really dumb (building a style rule with hundreds of custom properties one custom property at a time), and due to how we store custom properties we're slower.
So there's something to optimize here (avoid the O(n^2) during custom property parsing), but the page is doing something very silly regardless.
Assignee | ||
Comment 3•2 years ago
|
||
I filed https://github.com/material-foundation/material-theme-builder/issues/158, though we should look into the perf difference in comment 2.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
The test-case included goes from 10s to a couple hundred milliseconds on
my machine. No behavior change other than that.
Assignee | ||
Comment 5•2 years ago
|
||
The test-case goes from 10s to a couple hundred milliseconds on my
machine.
Depends on D175612
Comment 7•2 years ago
|
||
bugherder |
Reporter | ||
Comment 8•2 years ago
•
|
||
This is the profile from latest Nightly: https://share.firefox.dev/3LbhpU8
Nightly takes ~7 seconds for "Custom" and 2 seconds for "Dynamic". This (switching to "custom") is still slower compared to Chrome, but I dont know if its worth spending more time on this bug.
On the testcase, we are comparable to Chrome now (2 seconds)
Comment 10•2 years ago
|
||
bugherder |
Description
•