Skip to content
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

Fix performance issue with MutationObserver in hideAmericanAndCanadianStatesFromFilter #12

Open
ineffyble opened this issue Oct 17, 2016 · 0 comments

Comments

@ineffyble
Copy link
Owner

From the FireFox add-on review team:

Here is another tip: use observer.disconnect(); before removing nodes in function hideAmericanAndCanadianStatesFromFilter (and if needed, use .observe(...) to continue listening again when the function finishes). Currently it is not a huge problem because you are only removing nodes, but usually it will lead to performance issues when a DOM mutation triggers the MutationObserver, which in turn triggers a DOM mutation, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant