Skip to content

fix performance by remove unnecessary O(n^2) and O(n^3) calls#271

Open
phiresky wants to merge 1 commit intoMyCryptoHQ:masterfrom
phiresky:master
Open

fix performance by remove unnecessary O(n^2) and O(n^3) calls#271
phiresky wants to merge 1 commit intoMyCryptoHQ:masterfrom
phiresky:master

Conversation

@phiresky
Copy link

tobalancemap has a huge perf issue that causes continuous almost 100% cpu use if you scan a few thousand addresses. the cause is a reduce call that creates huge amounts of objects because of a clever reduce that makes it O(n^2) instead of a simple loop. this fixes that.

profiler screenshot before:
image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant