Closed Bug 1145914 Opened 10 years ago Closed 10 years ago

Multiple attribute changes are queued up on server and sent over with the same values

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
Firefox 39
Tracking Status
firefox39 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file, 1 obsolete file)

Open the inspector on https://bgrins.github.io/devtools-demos/inspector/mutations.html. There is an attribute changing in a loop: for (var i = 0; i < 1000; i++) { document.querySelector("#toofast").setAttribute("data-toofast", toofast++); } If you open the inspector on that tab and watch the protocol traffic, you'll see 1000 duplicate packets per batch like this: { "type": "attributes", "target": "server1.conn1.domnode107", "numChildren": 3, "attributeName": "data-toofast", "newValue": "5999" }, { "type": "attributes", "target": "server1.conn1.domnode107", "numChildren": 3, "attributeName": "data-toofast", "newValue": "5999" }, { "type": "attributes", "target": "server1.conn1.domnode107", "numChildren": 3, "attributeName": "data-toofast", "newValue": "5999" }
Interestingly, after the fix in Bug 1139569, the frontend doesn't care much about these duplicate packets since the attribute value hasn't changed, but we still shouldn't send them to prevent unnecessary noise
See Also: → 1139569
Something like this, probably
(In reply to Brian Grinstead [:bgrins] from comment #2) > https://bgrins.github.io/devtools-demos/inspector/mutations.html You just killed my browser with this page :)
Dave, we've discussed the issue in which multiple attribute modifications get queued up and sent across in a single call to getMutations. This patch prunes out any duplicate attribute modifications that happen within a single call to getMutations. What do you think? If you're too busy, please redirect the review to Patrick.
Assignee: nobody → bgrinstead
Attachment #8581010 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8581691 - Flags: review?(dcamp)
Attachment #8581691 - Flags: review?(dcamp) → review+
Blocks: 1147734
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
See Also: → 1188640
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: