Skip to content

Find By Id Performance Enhancement with Map #1895

Open
@dhdnjswnd

Description

@dhdnjswnd

I draw large amount of objects which is more than 50,000.
And I also try to edit them interactively.
I found out it is really slow when I'm looking for a specific element.
(Plz let me know if you have another way to search an element)
(I cached groups to improve performance.)

It is caused by the way Container handle their children.
They find an element in DFS way.

How about handling children in two ways?

Of course, I should change all functions, like remove, add, delete.

`export abstract class Container<
ChildType extends Node = Node

extends Node {
children: Array = [];
/// plus mappedChildren: Map<String, ChildType> = new Map<String, ChildType>();
`

stage

  • layer
    • group -elements
    • group -elements
    • group -elements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions