Skip to content

graph: Avoid unnecessary entity deep clone in as_modifications#6362

Open
lutter wants to merge 1 commit intomasterfrom
lutter/deep-clone
Open

graph: Avoid unnecessary entity deep clone in as_modifications#6362
lutter wants to merge 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.

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
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.

1 participant