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

Refactor: reduce snapshot allocation overhead by reference sharing #24

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

rongma7
Copy link
Contributor

@rongma7 rongma7 commented Feb 21, 2025

Previously, SnapshotView maintained a complete copy of the current map in the pending part, resulting in significant allocation and deallocation overhead.

This PR replaces the direct copy with reference sharing.


This change is Reviewable

@rongma7 rongma7 requested a review from ChenxingLi February 21, 2025 09:28
@rongma7 rongma7 force-pushed the refactor/optimize-snapshot-memory branch from 8df6e2f to 34f505b Compare February 24, 2025 09:14
@rongma7 rongma7 changed the title Refactor: reduce snapshot allocation overhead by sharing pending data with Arc<Mutex> Refactor: reduce snapshot allocation overhead by reference sharing Feb 24, 2025
Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @rongma7)

@rongma7 rongma7 merged commit 532b02f into master Mar 3, 2025
2 checks passed
@rongma7 rongma7 deleted the refactor/optimize-snapshot-memory branch March 3, 2025 08:24
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.

2 participants