Open Bug 726523 Opened 13 years ago Updated 2 years ago

Consider deferring redundant attributes changes to event dispatch

Categories

(Core :: SVG, defect)

defect

Tracking

()

People

(Reporter: birtles, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 629200 introduces a new scheme for storing SVG attributes that uses SVG types. Whilst more efficient, no longer using strings to store the attributes means we can no longer rely on nsGenericElement to detect and filter out redundant changes by comparing the before and after strings. To fix this, bug 629200 introduces a fair bit of extra code to the SVG types. Every time we're about to call nsSVGElement::WillChangeXXX we first check if the change we're about to make is redundant or not. Using this approach we catch the change at the earliest possible moment. However, it's fragile. We can easily forget to do it in one place and end up sending redundant notification messages. It also increases code size. One alternative approach is to remove all that code and just check the atoms that make up the mutation event's prevValue and newValue members. This is simpler and more robust but means we don't catch the change until the last moment which may mean we unnecessarily execute a lot of code. Attached is a patch that implements this alternative approach although it's not yet clear which approach is preferable here.
Update patch header
Attachment #596578 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: