Skip to content

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

@bebraw

Description

@bebraw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions