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

Improve putSync performance of Memory store. #226

Conversation

nijuyr
Copy link

@nijuyr nijuyr commented Dec 30, 2019

Closes #183

This PR improves the performance of putSync by

  1. skipping splice operation on array when the index of the updated object is not changed. (most of simple object update via putSync does not change index)
  • Array.prototype.splice is an expensive operation especially when the size of the array is huge.
  1. skipping re-indexing when the index of the updated object is not changed.

Performance -
Updating 10000 objects with putSync takes ~15ms

@dylans
Copy link
Member

dylans commented Dec 30, 2019

Thanks @nijuyr , we will review this in early January and hopefully land this and then get a new dstore release live that includes this update.

@msssk
Copy link
Contributor

msssk commented Jan 8, 2020

This enhancement was made in #227. Thank you for your work on this @nijuyr!

@msssk msssk closed this Jan 8, 2020
@nijuyr nijuyr deleted the issue-183-enhance-memory-putsync-performance branch April 20, 2020 08:22
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.

Questionable PutSync performance
3 participants