Skip to content

feat(cache): log persistent cache read and write timings#14314

Open
hardfist wants to merge 3 commits into
mainfrom
cursor/574f5e6d
Open

feat(cache): log persistent cache read and write timings#14314
hardfist wants to merge 3 commits into
mainfrom
cursor/574f5e6d

Conversation

@hardfist

@hardfist hardfist commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add info-level timing logs to persistent cache read/write phases (build dependencies, snapshot, occasion recovery, staging, and disk flush).
  • Normalize cache test snapshots for duration output and update cache case expectations.
  • Document the new timing logs in the persistent cache docs.

Related links

Fixes #14102

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Test plan

  • cargo test -p rspack_core cache::
  • cd tests/rspack-test && pnpm run test -t "cacheCases"

Emit info-level durations for persistent cache recovery, staging, and
flush so builds with stats.logging can see where cache I/O time is spent.

Fixes #14102
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 8, 2026

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: f9ae58c
Status: ✅  Deploy successful!
Preview URL: https://78f2b628.rspack-v2.pages.dev
Branch Preview URL: https://cursor-574f5e6d.rspack-v2.pages.dev

View logs

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing f9ae58c to refactor: swc exp for javascript parser plugin (#14256) by CPunisher

❌ Size increased by 4.00KB from 62.60MB to 62.60MB (⬆️0.01%)

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 551.3 KB - -
react-10k 5.6 MB 1.3 MB - -
react-1k 822.8 KB 218.3 KB - -
react-5k 2.7 MB 669.1 KB - -
ui-components 4.8 MB 1.4 MB - -
📋 Detailed Reports (Click to expand)

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.7 MB - -
🗜️ Gzip Size 551.3 KB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 289.0 B - -
📁 Other Assets 0 B - -

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.6 MB - -
🗜️ Gzip Size 1.3 MB - -
📄 JavaScript 5.6 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 822.8 KB - -
🗜️ Gzip Size 218.3 KB - -
📄 JavaScript 822.4 KB - -
🎨 CSS 0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
🗜️ Gzip Size 669.1 KB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 4.8 MB - -
🗜️ Gzip Size 1.4 MB - -
📄 JavaScript 4.7 MB - -
🎨 CSS 111.7 KB - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 52 untouched benchmarks
⏩ 40 skipped benchmarks1


Comparing cursor/574f5e6d (f9ae58c) with main (1fd4fca)

Open in CodSpeed

Footnotes

  1. 40 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@hardfist

hardfist commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@codspeed explain regression

@codspeed-hq

codspeed-hq Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@codspeed explain regression

Regression analysis

Short version: the two flagged benchmarks are not affected by the code in this PR — the ~3% deltas are measurement noise, not a real regression.

What this PR changes

The only Rust change is in crates/rspack_core/src/cache/persistent/context.rs. It adds Instant::now() timers and a handful of logger().info(...) calls around the persistent cache read/write phases (build deps, snapshot, occasion recovery, staging, flush). Everything else is test snapshots and docs.

What regressed

Benchmark Delta
rust@create_full_hash 6.0 ms → 6.2 ms (-3.02%)
rust@mangle_exports 7.0 ms → 7.2 ms (-2.71%)

Neither of these benchmarks exercises the persistent cache. I re-rooted the flamegraph for create_full_hash on the HEAD run, and its hot path is entirely hashing and chunk-hash generation (xxhash_rust::xxh64::update, rspack_hash::RspackHash::write, create_hash::process_chunk_hash, runtime-module generation). There is no CacheContext, load_*, format_duration, or storage frame anywhere in the call tree — the changed code simply doesn't run in these benchmarks. mangle_exports is similarly unrelated to cache I/O.

Why the numbers moved anyway

The CodSpeed comment itself flags two confounders:

  • Different runtime environments detected — the regressed benchmarks were compared across different runtime environments, which directly affects the numbers.
  • Unexpected base — no successful run existed on main (37775da), so a19f64e was used as the comparison base instead. That base contains changes unrelated to this PR (e.g. the wasmtime-36 bump), so part of the delta comes from base drift rather than this branch.

Combined with the small magnitude (~0.2 ms, roughly run-to-run jitter for a Simulation benchmark), this is consistent with noise rather than a code-caused regression.

Recommendation

No code change is needed for this — the cache-timing logs can't slow down hash/export benchmarks that never touch the cache. You can safely acknowledge these two benchmarks on CodSpeed. If you'd like a cleaner comparison, re-running once a successful main baseline exists should make the delta disappear.

Summary
  • Warming up the performance wizard...
  • Investigating CodSpeed regression — Determined the reported regression is environment noise, not attributable to the PR's persistent-cache-only changes, and posted an explanation
  • Handling comment — Comment handling finished successfully

Was this response helpful? React with 👍 or 👎 to help us improve CodSpeedBot.

@hardfist hardfist marked this pull request as ready for review June 8, 2026 12:31
@hardfist hardfist requested a review from LingyuCoder as a code owner June 8, 2026 12:31
Copilot AI review requested due to automatic review settings June 8, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds info-level timing logs for persistent cache read/write phases to help explain “missing” wall-clock time when persistent cache is enabled (Fixes #14102), and updates docs/tests to reflect the new log output.

Changes:

  • Add per-phase timing logs in CacheContext for build dependency validation, snapshot restore, occasion recovery/save, staging, and disk flush.
  • Normalize duration output in cache-case stats snapshot matching and update many cache-case snapshots accordingly.
  • Document the new timing logs in the persistent cache configuration docs (EN + ZH).

Reviewed changes

Copilot reviewed 123 out of 123 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/rspack_core/src/cache/persistent/context.rs Adds timing instrumentation logs around persistent cache load/save/stage/flush phases.
packages/rspack-test-tools/src/case/cache.ts Normalizes xx ms placeholders by replacing numeric millisecond durations in stats output.
website/docs/en/config/cache.mdx Documents that persistent cache logs now include phase read/write timing information.
website/docs/zh/config/cache.mdx Same as EN docs; explains timing logs for each cache phase in Chinese.
tests/rspack-test/cacheCases/storage/directory/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/storage/directory/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/storage/directory/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/storage/directory/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/unmanaged-paths/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/unmanaged-paths/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/unmanaged-paths/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/unmanaged-paths/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/missing_dependencies/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/missing_dependencies/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/managed-paths/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/managed-paths/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/managed-paths/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/managed-paths/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/immutable-paths/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/immutable-paths/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/immutable-paths/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/immutable-paths/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/default_value/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/default_value/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/default_value/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/default_value/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/context-dependencies/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/context-dependencies/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/snapshot/context-dependencies/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/portable/basic/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/portable/basic/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/portable/basic/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/mf/issue-9150/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/mf/issue-9150/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/mf/issue-9150/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/mf/issue-9150/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/refactorize_dep/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/refactorize_dep/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/refactorize_dep/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/provide-plugin/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/provide-plugin/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/provide-plugin/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/provide-plugin/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/lazy-barrel/snapshots/stats-5.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/keep-module-error/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/keep-module-error/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/issuer-update/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/issuer-update/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/issuer-update/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/isolated_module/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/isolated_module/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/isolated_module/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/isolated_module/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/define-plugin/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/define-plugin/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/define-plugin/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/make/define-plugin/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/lib-symlink/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/lib-symlink/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-name/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-name/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-name/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-name/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-mode/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-mode/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-mode/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/invalidation/config-mode/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/version/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/version/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/version/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/version/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/update-file/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/update-file/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/update-file/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/update-file/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/update-file/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/rstest-virtual-module-mock-build-cache/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/rstest-virtual-module-mock-build-cache/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/readonly/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/readonly/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/readonly/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/readonly/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/readonly/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/module-asset/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/module-asset/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/module-asset/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/module-asset/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/minimize-cache/snapshots/stats-5.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies/snapshots/stats-5.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-5.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-resolve/snapshots/stats-6.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-4.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-5.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-6.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/build-dependencies-dir/snapshots/stats-7.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/basic/snapshots/stats-0.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/basic/snapshots/stats-1.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/basic/snapshots/stats-2.txt Updates expected persistent cache timing logs in stats snapshot.
tests/rspack-test/cacheCases/common/basic/snapshots/stats-3.txt Updates expected persistent cache timing logs in stats snapshot.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 185 to 190
// load_failed: reset snapshot scopes so they are fully rewritten this build.
if !self.readonly {
snapshot.reset(&mut *self.storage);
}
log_read_timing(self.logger(), "snapshot", start);
None
Comment on lines 231 to 255
@@ -233,6 +251,7 @@
if !self.readonly {
occasion.reset(&mut *self.storage);
}
log_read_timing(self.logger(), occasion.name(), start);
None
Comment on lines +267 to +271
log_write_timing(
self.logger(),
&format!("{} persistent cache", occasion.name()),
start,
);
Comment thread website/docs/zh/config/cache.mdx Outdated
```

日志会包含持久化缓存的关键信息,例如持久化缓存是否启用、构建依赖是否有效、缓存恢复是否成功,以及持久化缓存失效的原因同时也会包含其他 logger 的日志。
日志会包含持久化缓存的关键信息,例如持久化缓存是否启用、构建依赖是否有效、缓存恢复是否成功,以及持久化缓存失效的原因。日志还会包含各缓存阶段的读写耗时(例如构建依赖校验、快照恢复、occasion 恢复、暂存以及刷盘)。同时也会包含其他 logger 的日志。
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.

[Bug]: rspack takes noticeably longer than reported when the persistent cache is on

2 participants