custom-attributes icon indicating copy to clipboard operation
custom-attributes copied to clipboard

performance: observe only defined attributes

Open trusktr opened this issue 5 years ago • 0 comments

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.

trusktr avatar Sep 12 '20 07:09 trusktr