Skip to content

graph: Avoid unnecessary entity deep clone in as_modifications#6362

Merged
lutter merged 1 commit intomasterfrom
lutter/deep-clone
Feb 17, 2026
Merged

graph: Avoid unnecessary entity deep clone in as_modifications#6362
lutter merged 1 commit intomasterfrom
lutter/deep-clone

Conversation

@lutter
Copy link
Collaborator

@lutter lutter commented Feb 13, 2026

Use Arc::try_unwrap to move the entity out of the Arc without cloning when the refcount is 1 (the common case after remove() from the LFU cache). Also make merge_remove_null_fields return whether it changed anything, replacing the post-merge full entity comparison.

@lutter lutter requested a review from incrypto32 February 14, 2026 00:12
Use Arc::try_unwrap to move the entity out of the Arc without cloning
when the refcount is 1 (the common case after remove() from the LFU
cache). Also make merge_remove_null_fields return whether it changed
anything, replacing the post-merge full entity comparison.
@lutter lutter merged commit 7105c15 into master Feb 17, 2026
6 checks passed
@lutter lutter deleted the lutter/deep-clone branch February 17, 2026 02:01
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