Skip to content

perf(fs): speed up native metadata conversion#14707

Draft
hardfist wants to merge 1 commit into
mainfrom
perf/fs-metadata-fast-path
Draft

perf(fs): speed up native metadata conversion#14707
hardfist wants to merge 1 commit into
mainfrom
perf/fs-metadata-fast-path

Conversation

@hardfist

@hardfist hardfist commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a Unix metadata conversion fast path in rspack_fs::FileMetadata using std::os::unix::fs::MetadataExt.
  • Keep the existing SystemTime conversion path for non-Unix targets.

Performance Impact

Native filesystem metadata is queried by resolver, snapshot, and cache invalidation paths. This avoids repeated SystemTime construction and duration_since conversion for Unix mtime and atime values while preserving the existing millisecond timestamp semantics.

The expected benefit is lower CPU overhead in high-cardinality stat-heavy paths, especially during dependency resolution and persistent cache snapshot checks.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 7f8a7b2 to fix(esm_library): preserve static source-phase external bindings (#14674) by Elecmonkey

🙈 Size remains the same at 66.74MB

@codspeed-hq

codspeed-hq Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing perf/fs-metadata-fast-path (7f8a7b2) with main (df598e4)

Open in CodSpeed

Footnotes

  1. 47 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.

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.

1 participant