Skip to content

perf: speed up deepClone with large number of circular refs#4734

Open
lukecotter wants to merge 2 commits into
tabulator-tables:masterfrom
lukecotter:perf-deepclone-circular-refs
Open

perf: speed up deepClone with large number of circular refs#4734
lukecotter wants to merge 2 commits into
tabulator-tables:masterfrom
lukecotter:perf-deepclone-circular-refs

Conversation

@lukecotter

Copy link
Copy Markdown
Contributor

perf: use weak map to track circular refs

Instead of a list. On a large tree with a circular ref on every node this took deep clone from > 5 mins (I stopped counting here) to < 3 sec for me.

Instead of a list. On a large tree with a circular ref on every node
this took deeop clone from > 5 mins to < 1 sec for me.
@rathboma

Copy link
Copy Markdown
Collaborator

@lukecotter This does change the behavior though right? It changes it from using .copy to using the reference directly. Is that intentional? What are the side effects of that?

@lukecotter

Copy link
Copy Markdown
Contributor Author

@rathboma oof I forgot to add to the map. It’s in my local copy I will sort asap. Sorry about that.

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

Labels

None yet

2 participants