Closed Bug 1823545 Opened 1 year ago Closed 1 year ago

SVG attribute handling is a bit allocator heavy

Categories

(Core :: SVG, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: smaug, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

https://speedometer-preview.netlify.app/interactiverunner
React-Stockcharts-SVG

Bug 1823397 fixed one case, but there are others.

https://searchfox.org/mozilla-central/rev/d2786d9a6af7507bc3443023f0495b36b7e84c2d/dom/svg/SVGElement.cpp#334-335
We seem to delete and then soon recreate a DeclarationBlock.

https://searchfox.org/mozilla-central/rev/d2786d9a6af7507bc3443023f0495b36b7e84c2d/dom/svg/SVGElement.cpp#1147,1151,1162
URLExtraData lives usually (always?) just as long as the stack allocated MappedAttrParser.
Could also it be allocated from the stack? Or if it needs to stay alive longer in some cases, could such heap allocation happen lazily?

Flags: needinfo?(emilio)
Whiteboard: [sp3]
Depends on: 1823686

Ideally we'd only update the attributes that actually changed. That's a
bit more work I can try to look into, but this and bug 1823686 should
improve things here.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93ff6361a0f3
Reuse declaration block with SVG presentation attributes. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: