-
Notifications
You must be signed in to change notification settings - Fork 97
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 performance for creating crdt.TreeNode #875
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe recent changes significantly enhance the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #875 +/- ##
==========================================
- Coverage 80.85% 80.81% -0.05%
==========================================
Files 60 60
Lines 4639 4639
Branches 943 942 -1
==========================================
- Hits 3751 3749 -2
- Misses 621 622 +1
- Partials 267 268 +1 ☔ View full report in Codecov by Sentry. |
What this PR does / why we need it?
Enhance tree conversion for better performance
The time complexity of creating converter.fromTreeNodes was O(N^2), potentially causing performance bottlenecks. It's optimized to O(n) with this commit.
While this may not be a significant issue currently, there is a risk that as the number of tree nodes in the protobuf increases, operations will scale quadratically, potentially causing performance bottlenecks.
Any background context you want to provide?
What are the relevant tickets?
Fixes yorkie-team/yorkie#930
Checklist
Summary by CodeRabbit
New Features
Performance Improvements
Bug Fixes