Skip to content

Reuse file modification times during generation - #300

Merged
joetannenbaum merged 2 commits into
nextfrom
composer-update
Aug 12, 2026
Merged

Reuse file modification times during generation#300
joetannenbaum merged 2 commits into
nextfrom
composer-update

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

Bumps laravel/surveyor to ^0.2.7 and turns on its new AnalyzedCache::freezeFileTimes() for the duration of wayfinder:generate.

The analyzed cache checks a file's modification time on every lookup, and PHP only caches the most recently stat'ed file, so interleaved lookups all hit the OS. Since a one-shot command can't have its files change underneath it, we look each one up once and reuse it, then unfreeze when the command finishes.

On the workbench (55 PHP files) a warm run drops from 23,681 stat calls to 806, and a cold run from 14,858 to 806. Generated output is unchanged.

@joetannenbaum
joetannenbaum merged commit 94a1194 into next Aug 12, 2026
11 checks passed
@joetannenbaum
joetannenbaum deleted the composer-update branch August 12, 2026 23:24
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