Conversation
Give effect caches a lazy owner independent of short-lived analysis workers. Preserve each dependency target's reachable-function budget while reading its module once, and retain unsupported-node provenance. Compile BEAM regression fixtures under test/support and assert classification results as well as load counts. Validate with mix ci and a repeated full test run.
Collaborator
|
Thanks for tracking this down! I pushed d947643 to fix a cache lifetime race, preserve per-function analysis limits when batching, and keep the existing provenance behavior. I also fixed the test fixtures so they actually load compiled BEAM code. |
Preload IR-referenced modules, short aliases, and plugins in a worker that receives only module atoms. OTP 29 can force GC after a successful code load; loading in the graph-owning process repeatedly traversed the large project heap. Use sorted module atoms for plugin cache fingerprints instead of repeatedly rendering names. Add a cold-module regression asserting loading happens outside the project owner. Validated with mix ci, repeated full tests, and three cold runs over 804 local Hex corpus files. Median inference dropped from 36.4s to 5.9s with identical classifications for 7476 functions and the same 436 finding identities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #44.
Performance
Measured on a 638-file Phoenix project with the same command: MIX_ENV=test mix reach.check --arch --smells
Internal profiling showed the first effect-inference pass falling from 220.38s to 2.18s. Dependency preloading took 0.15s for 169 requested MFAs.
Verification