Repository navigation
Retire hot ops at their authored stamps - #4637
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 8 files
Confidence score: 4/5
history.rscan substantially increase peak memory when loading large histories by keeping the input vector alongside a seconddeltasvector. Keep the supplied vector asHistory.deltasand derive the indexes from it.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="document/graph-storage/src/history.rs">
<violation number="1" location="document/graph-storage/src/history.rs:35">
P2: Loading a large history now retains the input vector while building a second `deltas` vector, substantially increasing peak memory. Keep the supplied vector as `History.deltas` and derive the indexes from it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| pub fn from_ordered(deltas: Vec<Delta>) -> Self { | ||
| let index = deltas.iter().enumerate().map(|(position, delta)| (delta.id, position)).collect(); | ||
| Self { deltas, index } | ||
| let mut history = Self::default(); |
Contributor
There was a problem hiding this comment.
P2: Loading a large history now retains the input vector while building a second deltas vector, substantially increasing peak memory. Keep the supplied vector as History.deltas and derive the indexes from it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At document/graph-storage/src/history.rs, line 35:
<comment>Loading a large history now retains the input vector while building a second `deltas` vector, substantially increasing peak memory. Keep the supplied vector as `History.deltas` and derive the indexes from it.</comment>
<file context>
@@ -27,8 +32,9 @@ impl History {
pub fn from_ordered(deltas: Vec<Delta>) -> Self {
- let index = deltas.iter().enumerate().map(|(position, delta)| (delta.id, position)).collect();
- Self { deltas, index }
+ let mut history = Self::default();
+ deltas.into_iter().for_each(|delta| history.push(delta));
+ history
</file context>
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 2, 2026 21:19
ca8fa80 to
6255366
Compare
TrueDoctor
added this pull request to stack #4643
October 3, 2026 14:04
timon-schelling
approved these changes
Oct 4, 2026
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 5, 2026 20:40
6255366 to
5cf4788
Compare
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 5, 2026 21:07
5cf4788 to
fd69da6
Compare
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 7, 2026 15:54
fd69da6 to
f9bcae2
Compare
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 7, 2026 15:57
f9bcae2 to
5680176
Compare
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 7, 2026 16:22
5680176 to
9e26847
Compare
…he retirement time
TrueDoctor
force-pushed
the
graph-storage-3-retirement-stamps
branch
from
October 7, 2026 18:04
9e26847 to
349b672
Compare
5 of 51 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.