Perform less last write time I/O checks during indexing#703
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
🤖 Augment PR SummarySummary: Reduces filesystem I/O during indexing by caching 🤖 Was this summary useful? React with 👍 or 👎 |
| // change. If we did build it, refreshing already set a synthetic timestamp | ||
| // that the cache lookup above would have returned instead | ||
| std::unique_lock lock{this->mutex}; | ||
| this->marks.emplace(path, value); |
There was a problem hiding this comment.
There’s a potential race here: another thread could call refresh(path) after the initial cache lookup but before this emplace, causing emplace to fail while mark() still returns the older value (so the returned mark can differ from what’s cached). Consider ensuring mark() returns the value actually stored in marks under the write lock so callers see a consistent mark.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Benchmark Index (community)
Details
| Benchmark suite | Current: 67eabad | Previous: f68e4e2 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
41 ms |
40 ms |
1.02 |
Add one schema (100 existing) |
418 ms |
382 ms |
1.09 |
Add one schema (1000 existing) |
4312 ms |
3882 ms |
1.11 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark Index (enterprise)
Details
| Benchmark suite | Current: 67eabad | Previous: f68e4e2 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
49 ms |
43 ms |
1.14 |
Add one schema (100 existing) |
404 ms |
422 ms |
0.96 |
Add one schema (1000 existing) |
4059 ms |
4071 ms |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com