Skip to content

Date native symbols from a generated dictionary instead of loading every callmap - #14464

Merged
danog merged 1 commit into
vimeo:masterfrom
danog:callmap-introductions
Nov 21, 2026
Merged

danog merged 1 commit into
vimeo:masterfrom
danog:callmap-introductions

Conversation

@danog

@danog danog commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Reporting a newer native function as undefined (Function str_increment is not defined for the analysed PHP version 8.1 (it was introduced in PHP 8.3)) loaded all 12 callmaps, a 24 MB peak: amphp-amp's Psalm memory goes from 65 MB to 43 MB.

https://claude.ai/code/session_0134ww6vqixM8wK7okgxnEvo

@danog danog added the release:fix The PR will be included in 'Fixes' section of the release notes label Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Performance: improved · Types: unchanged

Project Memory (MB) Wall (s) Issues Weighted (types) Taint
✅ laravel 1 749 $\color{gray}{\textsf{-0.1\%}}$ 71.1 $\color{gray}{\textsf{-1.4\%}}$ 25 908 53 462 682
✅ symfony 3 599 261.2 50 611 98 405 1 528
✅ doctrine-orm 380 $\color{gray}{\textsf{-0.3\%}}$ 13.0 $\color{gray}{\textsf{-2.7\%}}$ 3 481 6 143 0
✅ psl 617 16.0 $\color{gray}{\textsf{-3.2\%}}$ 1 375 5 615 1
✅ phpunit 455 20.5 $\color{gray}{\textsf{+1.3\%}}$ 1 731 3 410 18
✅ php-parser 226 13.7 $\color{gray}{\textsf{+0.4\%}}$ 17 132 21 025 0
✅ tempest 895 37.1 $\color{gray}{\textsf{-0.4\%}}$ 5 047 10 528 252
✅ amphp-amp 45 $\color{green}{\textsf{-33.0\%}}$ 1.5 $\color{green}{\textsf{-21.5\%}}$ re-run 29 49 0
✅ webmozarts-assert 273 4.6 $\color{gray}{\textsf{-0.2\%}}$ 577 2 720 0
✅ guzzle-promises 44 1.6 $\color{gray}{\textsf{-0.6\%}}$ 155 434 2
✅ monolog 135 5.6 $\color{gray}{\textsf{-0.7\%}}$ 913 2 479 10
✅ drupal 4 841 239.7 $\color{gray}{\textsf{-2.1\%}}$ 97 591 169 293 583
Total 13 260 $\color{gray}{\textsf{-0.2\%}}$ 685.4 $\color{gray}{\textsf{-1.1\%}}$ 204 550 373 563 3 076
How to read this table
  • Memory: Psalm's own peak figure, threads=1. More than +5 % fails, unless the PR changes composer.json.
  • Wall: base and head run on the same runner; ±10 % is noise. Above +20 % warns, never fails. re-run: a reversed second run was taken and the faster kept.
  • Issues: head count over all categories, then $\color{red}{\textsf{+added}}$ $\color{green}{\textsf{-removed}}$ against base.
  • Weighted (types): type issues weighted by error level (levels 1–8 as is, always-errors 10, strictness checks 1). Taint and dead-code issues are not weighed. The projects' own code is pinned and their dependencies resolve identically for base and head, so a change means Psalm reports more, fewer or differently serious issues. A rise is not necessarily a regression.
  • Taint: head count of Tainted* issues, then $\color{orange}{\textsf{+added}}$ $\color{orange}{\textsf{-removed}}$ against base. Both are orange as either direction needs review: more can be new detection or false positives, fewer can be fixed false positives or lost detection.
  • Dead code: head count of unused-code issues, shown only when a run reported some (findUnusedCode). More is red, fewer is green.
  • Total: sum over the projects compared on both sides. Thresholds apply per project, not to the total.
  • Colors: $\color{red}{\textsf{red}}$ past a fail or warn threshold (or more issues), $\color{green}{\textsf{green}}$ an improvement past noise (or fewer issues), $\color{orange}{\textsf{orange}}$ needs review, $\color{gray}{\textsf{gray}}$ noise.
  • Performance: regressed if a head run crashed or timed out or a memory or wall delta is red, else improved if one is green, else unchanged. Its icon is the check result: ❌ fail · ⚠️ warn · ✅ pass; the icon next to each project is that project's result, 💥 = not comparable: base crashed or timed out (counts as ⚠️).
  • Types (heading): direction of the total weighted change, increased · decreased · unchanged. Taint and Dead code (heading): added and removed counts, present only when non-zero. Informational, never fails the check.

head 931a5f2 · base 3a3fdf6 (merge-base) · workflow run

Reading the version that introduced a function from every versioned callmap
peaked at about 24 MB, the first time Psalm reported a newer native function as
undefined.

Claude-Session: https://claude.ai/code/session_0134ww6vqixM8wK7okgxnEvo
@danog
danog force-pushed the callmap-introductions branch from 0a92331 to 931a5f2 Compare November 21, 2026 16:26
@danog

danog commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 931a5f2. Configure here.

@danog
danog merged commit 0ae0b17 into vimeo:master Nov 21, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix The PR will be included in 'Fixes' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant