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

Request to change Default Mutation Observer #227

Open
chris-eaton opened this issue Dec 24, 2020 · 0 comments
Open

Request to change Default Mutation Observer #227

chris-eaton opened this issue Dec 24, 2020 · 0 comments

Comments

@chris-eaton
Copy link

Hi.

First of all, love the gauges, they are super pretty and work really nicely.

However, the default Mutation Observer model is extremely resource heavy. I can be on a page that has no gauges and the majority of CPU is taken up looking for dom changes. Had I not been profiling my code extensively, and know how to understand these results I would not have picked up on it. Its likely others would never be aware of such issues.

As such I'd like to propose changing the default mutation observer to disabled. That way its far more performant out the box.

Some details:

  • On page change, almost 500ms is spent in Gauge code tracking observations. Note this is simply from having the JS loaded. No gauges were ever created
  • On page change observe is called about 30 times, and process about 3500 times. This is of course very subjective to my page, so take with a pinch of salt, I just wanted to highlight the issues I am having.
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