Skip to content

Keep input order of files within striped jobs#5859

Merged
ondrejmirtes merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:perf/striping-preserve-input-order
Jun 12, 2026
Merged

Keep input order of files within striped jobs#5859
ondrejmirtes merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:perf/striping-preserve-input-order

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

Fixes the bug-14036 e2e regression from #5844, reported by @staabm.

The size sort also changed the order files get analysed in within a job, and results can be sensitive to that: the 560-byte middleware file moved before the 327-byte bootstrap file, so MemoizingReflector (lowercased keys) resolved SQLitePlatform first and the later SqlitePlatform lookup reported class.nameCase instead of the expected class.notFound. (I missed this locally because APFS is case-insensitive, which makes the e2e fail on base too on macOS.)

The sort now only decides which job a file lands in; within each job the original input order is restored. testFilesWithinAJobKeepTheirInputOrder pins the bug-14036 shape. make phpstan stays at 1.07× (17.73 ± 0.04 s vs 19.00 ± 0.06 s base).

🤖 Generated with Claude Code

The size sort from phpstan#5844 also changed the order files are analysed in
within a job, and analysis results can be sensitive to that: in the
bug-14036 e2e the 560-byte middleware file moved before the 327-byte
bootstrap file, so MemoizingReflector (lowercased keys) resolved
SQLitePlatform first and a later SqlitePlatform lookup reported
class.nameCase instead of the expected class.notFound.

The sort now only decides which job a file lands in; within each job
the original input order is restored. make phpstan stays at 1.07x
(17.73 +- 0.04 s vs 19.00 +- 0.06 s base).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ondrejmirtes ondrejmirtes merged commit b9cc732 into phpstan:2.2.x Jun 12, 2026
664 of 670 checks passed
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

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.

2 participants