Skip to content

Smarter reordering algorithm #36

@L3P3

Description

@L3P3

IS

Currently, node_map items are ordered by reinserting them when their index (absolute position) has changed.
Currently, node_map items are ordered by reinserting all of them.
Currently, node_map items are ordered by reinserting all of them if their nextSibling changes.

SHOULD

Just reinsert them if their relative position has changed!
Try to reinsert as fewest as possible without getting too complicated.

Note

In practice, it works well enough. But as shown by benchmark, this makes lui one of the slowest candidates for "remove row", since all n rows get reinserted without any need. It just looks bad in the table!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions