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 - Refactor from Node.appendChild to Element.append #58

Open
bebraw opened this issue Aug 17, 2022 · 0 comments
Open

Performance - Refactor from Node.appendChild to Element.append #58

bebraw opened this issue Aug 17, 2022 · 0 comments

Comments

@bebraw
Copy link
Member

bebraw commented Aug 17, 2022

Apparently "Element.append" can be much faster than "Node.appendChild" because of...... MutationObserver! 🤦‍♂️ I just stumbled on this: 1 "append" for N nodes causes the observer to give you 1 mutation record, N "appendChild" for N nodes cause N mutation records

https://twitter.com/fabiospampinato/status/1559925222182195201

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