Open Bug 1961455 Opened 8 months ago Updated 1 month ago

Testcase querying CSS properties is 8x slower and takes 150x more memory cmpared to Chrome (N=5000)

Categories

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

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Open testcase
N=5000

Firefox: https://share.firefox.dev/3YEyYSR (2.8s)
Chrome: https://share.firefox.dev/4j9Ygk6 (350ms)
Firefox to release memory: https://share.firefox.dev/4jiFkQo (1.7s)

Firefox takes ~3.2GB RAM whereas chrome only takes maybe 20MB.

Something to improve?

Flags: needinfo?(emilio)

If you change all: unset by any other property presumably things are more consistent across browsers? Chrome doesn't expand all (which causes correctness issues for them but is more efficient in this particular case).

Flags: needinfo?(emilio) → needinfo?(mayankleoboy1)

i replaced all:unset with appearance:none. Hopefully that is syntactically and logically correct.
The timings and memory use are much improved : https://share.firefox.dev/42ERR9E

Flags: needinfo?(mayankleoboy1) → needinfo?(emilio)

Yeah, so that's expected then. Do you know how we compare to chrome on your machine with that test-case? If it's not meaningfully different I'd say this is all expected.

Flags: needinfo?(emilio) → needinfo?(mayankleoboy1)
Flags: needinfo?(mayankleoboy1) → needinfo?(emilio)

Ok, so I can't see native chrome stacks there but there's something interesting and worth addressing which is the double hash when dealing with the inline stylesheet cache (of those two blue spots there, only the first should be needed).

Not the top priority to address but I'm looking at this code anyways for bug 1956486, so will keep it in mind.

Flags: needinfo?(emilio)
See Also: → 1956486
No longer blocks: 1943230
See Also: → 1943230
Flags: needinfo?(mayankleoboy1)

Profile with latest Nightly, N=5000: https://share.firefox.dev/3GxMphs

Flags: needinfo?(mayankleoboy1)
Blocks: 1980560
See Also: 1943230
Type: enhancement → defect

The severity field is not set for this bug.
:emilio, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Severity: -- → S3
Flags: needinfo?(emilio)
Priority: -- → P3

Testcase2 (without all:unset)
N=50000

Firefox: https://share.firefox.dev/4pCRQwI (7.5s)
Chrome: https://share.firefox.dev/3Y1oPit (3.5s)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: