Performance
matthewp opened this issue · comments
Matthew Phillips commented
These are the levers to pull:
querySelectorAll
- Currently this happens on every update. How can we limit this to only when something has changed? Things that can invalidate qSA:
attr
class-toggle
each
attach-template
- Currently this happens on every update. How can we limit this to only when something has changed? Things that can invalidate qSA:
- Dirty check to see if values have changed.
- Insertions need to be checked every time.
var()
needs to be checked when a dependent query changes.
matches
- Similar to the qSA problem, checked on every render. Should skip if there isn't an invalidation.
Matthew Phillips commented
Most of these have been implemented (just not selector specificity). Will create another issue to benchmark.