Mikhus / canvas-gauges

HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.
http://canvas-gauges.com/
MIT License
1.58k stars 396 forks source link

Request to change Default Mutation Observer #227

Open chris-eaton opened 3 years ago

chris-eaton commented 3 years ago

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: