Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FlameWolf/000b14312bb83ab1628ab0b80007eff0 to your computer and use it in GitHub Desktop.
Save FlameWolf/000b14312bb83ab1628ab0b80007eff0 to your computer and use it in GitHub Desktop.
Performance difference between insertAdjacentHTML and appendChild

Element.prototype.insertAdjacentHTML can be up to 4 times slower than Node.prototype.appendChild. So use the latter wherever possible for best performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment