Repository navigation
Perf: scan workers send back only the stubs they added (8 threads, no cache: -9 % wall, -14 % memory on a large Laravel app) - #12558
Conversation
✅ Performance: unchanged · Types: unchanged
How to read this table
head 4cbde28 · base a84681d (merge-base) · workflow run |
2ebf053 to
b4fdb05
Compare
…tions through both serializers
b4fdb05 to
fe28784
Compare
|
Rebased onto master 9c011f7. No conflicts. Re-measured on an M1 Pro,
|
Loading igbinary there also enabled apcu, which broke InternalCallMapHandlerTest and ConfigTest.
…rge-compact # Conflicts: # src/Psalm/CodeLocation.php # src/Psalm/Internal/Codebase/TaintFlowGraph.php # tests/TaintFlowGraphTest.php
…rge-compact # Conflicts: # src/Psalm/CodeLocation.php
…class Its own __serialize() and __unserialize() replace those of UnserializeMemoryUsageSuppressionTrait, so the class no longer uses the trait. The round-trip test goes through unserialize(), as a mutation-free __unserialize() has no effect Psalm can see when called directly.
|
Re-measured after merging master 0fd455b (head 58bf9db). Since the last numbers, master's #13536 already shares equal M1 Pro,
The gain is now in runs without a cache: with a warm cache the scan workers have little to send, and the warm deltas are within run-to-run noise (±1–2 % CPU on the M1).
|
Its positional format saved little next to the stubs the scan workers no longer send back, and needed a field list of its own and a cache layout bump.
A forked scan worker sent the main process every stubbed function and constant it inherited from it, once per worker and scan round, and the main process decoded them only to keep its own. Workers now send back only the ones they added.
--threads=8, no cacheThe gain grows with workers × scan rounds above 512 files: the Laravel app has several such rounds, the others one. With a warm cache scanning doesn't fork, and the numbers are unchanged.
M1 Pro (8 performance cores), PHP 8.5 with igbinary, median of 3 interleaved runs per cell against master a84681d. ¹ One run differs in issues that master also reports in some
--threads>1runs and not in others (HttpClientTrait.php:225,Extension.php:81).