Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Array.push() instead of spread/concat #985

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Conversation

t-d-d
Copy link
Contributor

@t-d-d t-d-d commented Dec 11, 2020

Found this via profiling. The change made a significant improvement for my use case - restoring multi Gigabyte state stores with 10s millions of messages (passing the key and value Buffers directly on to leveldb.)

Full data load time:
Before: 136s
After: 39s

With an empty eachBatch function:
Before: 127s
After: 28s

@t-d-d t-d-d changed the title User Array.push() instead of spread/concat Use Array.push() instead of spread/concat Dec 11, 2020
@tulios tulios merged commit ba34eef into tulios:master Dec 11, 2020
@tulios
Copy link
Owner

tulios commented Dec 11, 2020

Great contribution, thanks @t-d-d

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.

None yet

2 participants