-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutation observer causes severe performance issues #884
Comments
I looked some more into this and adding a Firefox DevTools logpoint on the Each time the Based on that a possible smaller change to reduce the performance impact observed in Bug 1794686 (the redash page linked in the bugzilla issue includes a quite a lot SVG elements that are created from the telemetry data to build the SVG-based graphs in the redash dashboard) may be to just call That change may look like:
To be fair, I'd guess that the options that are being retrieved through the extension messaging API should not be changing that often: contain-facebook/src/content_script.js Lines 717 to 725 in 1cbf353
And so, a more as part of a more complete refactoring of the content script it may be worth considering retrieving those options just once from the caller side and pass them to the
I haven't tried these changes on a page where the contains-facebook UI elements are expected to be shown, but on the redash page linked in the bugzilla issue the extensions seems to not having the same kind of performance impact that the current version have (e.g. I collected some profile data using the Firefox Profiler and the extension wasn't "dominating" the profile anymore). Hopefully these additional details may be already helpful enough to prepare a new version which reintroduce the changes introduced in 2.3.5 (minus the perf impact ;-)), but also feel free to ping me if I can help with some more |
I couple more side notes for a couple more things I noticed while digging into the perf issue and that I forgot to mention in my previous comment (even if not strictly needed as part of fixing the specific issue triggered by the mutation observer):
|
@maxxcrawford I see a PR has been merged for the initial problem but @rpl also mentioned other things to explore and improve. Would you be able to file new follow-up issues? And could you close this issue when that is done? Thanks |
For background, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1794686 and #883
There was a performance issue likely caused by a mutation observer in the version 2.3.5 of this extension. Quoting @rpl:
We should resolve this problem before we attempt to ship a new version.
The text was updated successfully, but these errors were encountered: