Closed Bug 1950269 Opened 23 days ago Closed 21 days ago

Testcase from bug 1945382 spends superlinear time "Layout cleanup" with reloading the page after generating N stylesheets (N=100k and above)

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

VERIFIED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: mayankleoboy1, Assigned: emilio)

References

Details

Attachments

(2 files)

Open the attached testcase. (Original "nested stylesheet_no BLOB" from bug 1945382)
Enter 100k , 200k, 300k and press enter
Wait for the stylesheets to get generated. May take a few 100ms which is amazing!
Reload the page using F5

100K: https://share.firefox.dev/4gRUHgA (3s)
200K: https://share.firefox.dev/3CSyZeA (11.6s)
300K: https://share.firefox.dev/3XiW5C1 (36s + 30s)

Maybe something to improve?

Flags: needinfo?(emilio)

Removing from the front is expensive anyways because it reallocates the
array.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)

Another case is to enter 100k and generate the stylesheets. Then without reloading, enter 1 and press enter.

100K

200K
Nightly: https://share.firefox.dev/41bLDgJ (40s)
Chrome: https://share.firefox.dev/435Cbhw (340ms)

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0d3bad538131 Optimize removing sheets from the end. r=firefox-style-system-reviewers,tlouw
Status: ASSIGNED → RESOLVED
Closed: 21 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

300K
Close the tab: https://share.firefox.dev/4kkCIlK (115ms)
Reloading the tab: https://share.firefox.dev/41ihRXB (35s around CC)

So the time spent in Layout/style is basically 0 now. The time spent in CC remains. . Not sure if a bug should be filed for the CC times.
But anyway, this bug is definitely fixed. Thanks Emilio!

Status: RESOLVED → VERIFIED
See Also: → 1951042
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: