diff options
| author | tv <tv@krebsco.de> | 2026-11-02 11:20:30 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 11:20:30 +0100 |
| commit | 315c0261ca1cfaf13cf4fde53642edc2bc63a73b (patch) | |
| tree | 10ce0ebfccd2a61c3f3c65df532589339538015e /src/remake/delta.rs | |
| parent | 99b10401ea70a016c7f3e23dbcd1149e6d56e008 (diff) | |
remake: read ops, not diffs
This gives bench_replay a speedup of ~8x/64x/280x.
Diffstat (limited to 'src/remake/delta.rs')
| -rw-r--r-- | src/remake/delta.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/remake/delta.rs b/src/remake/delta.rs index 2c6c93d..638231c 100644 --- a/src/remake/delta.rs +++ b/src/remake/delta.rs @@ -163,16 +163,15 @@ fn between(doc: &Document, before: &[ChangeHash], after: &[ChangeHash]) -> Vec<C found.into_iter().collect() } -/// For each of `changes` (in `doc`), its time and the store paths it touched. +/// For each of `changes` (in `doc`), its time and the store paths it touched, from its +/// operations (`store::changed_by`: a diff per change would cost what the maps it +/// touched hold, `remake::bench`). fn touched(doc: &Document, changes: &[ChangeHash]) -> Vec<(i64, Vec<Vec<String>>)> { changes .iter() .filter_map(|hash| { let change = doc.get_change_by_hash(hash)?; - let paths = store::changed(doc, change.deps(), &[*hash], InLists::Whole) - .into_iter() - .map(|changed| changed.path) - .collect(); + let paths = store::changed_by(doc, hash, InLists::Whole)?; Some((change.timestamp(), paths)) }) .collect() |
