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

performance: observe only defined attributes #1

Open
trusktr opened this issue Sep 12, 2020 · 0 comments
Open

performance: observe only defined attributes #1

trusktr opened this issue Sep 12, 2020 · 0 comments

Comments

@trusktr
Copy link
Member

trusktr commented Sep 12, 2020

Currently the MutationObserver reacts to changes in any attribute (f.e. the style attribute, any time LUME elements update their CSS3D transforms).

Instead, the MutationObserver should only observe changes in specified attributes (the defined "custom attributes") to avoid perf cost of the callback being called for every attribute change.

Use the attributeFilter option to MutationObserver.observe.

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

No branches or pull requests

1 participant