diff options
| author | tv <tv@krebsco.de> | 2026-11-02 11:20:30 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 11:22:04 +0100 |
| commit | 6174fd28c4c7311aafdf5ea22427c80725faafac (patch) | |
| tree | cd9b97b1bc8c61146e28b4af43365f7e66f29fa5 /src/remake/delta.rs | |
| parent | d5e9416ff9ec06e22aba4f69b1a29c5a7b729a2c (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() |
