Open Bug 1294197 Opened 4 years ago Updated 2 years ago
Make Mutation Observer report parser mutations in XUL
Steps to Reproduce: 1) Apply this patch on m-c 2) ./mach build browser/base 3) ./mach run 4) open "chrome://browser/content/aboutDialog.xul"
update STR patch to make it work against m-i
Attachment #8779832 - Attachment is obsolete: true
mozbuild.preprocessor.Error: ('/home/smaug/mozilla/hg/inbound2/browser/base/content/aboutDialog.xul', None, 'no preprocessor directives found', None)
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=431936b963c7 remote: remote: It looks like this try push has talos jobs. Compare performance against a baseline revision: remote: https://treeherder.mozilla.org/perf.html#/comparechooser?newProject=try&newRevision=431936b963c7
I know it's a WIP, but I decided to give it a try. One thing I noticed is that it seems it serves one MutationRecord for each and every node added separately, while in the HTML scenario it clusters all nodes served by parser together into a couple MutationRecords. In result, when I plugged MutationObserver into browser.xul, I got onMutations called 10 times, but the first of them had 1105 MutationRecords, each with one "addedNode". That means that iterating over those 1150 records to get 1150 addedNodes is fairly costly. Is it possible to optimize that?
not without changing how we construct xul documents.
You need to log in before you can comment on or make changes to this bug.