Skip to content

Add caching mechanism for includes to optimize repetitive scans#925

Draft
WalterWoshid wants to merge 1 commit intocarthage-software:mainfrom
WalterWoshid:optimizations
Draft

Add caching mechanism for includes to optimize repetitive scans#925
WalterWoshid wants to merge 1 commit intocarthage-software:mainfrom
WalterWoshid:optimizations

Conversation

@WalterWoshid
Copy link

📌 What Does This PR Do?

This adds a caching mechanism for includes.

🔍 Context & Motivation

We have a lot of vendor files and running the command on a single file takes ~5 seconds with optimizations (like threads and stack-size). Why do we run it on single files? We don't, the Mago IDE plugin (PhpStorm) does this. When running it with the --cache-includes flag, it reduces the time to ~2 seconds. This is a huge performance boost.

BUT: this is just a draft, I don't have the time to implement it cleanly, but this should be enough for someone to do it.

📂 Affected Areas

  • Analyzer
  • Linter
  • Formatter
  • CLI
  • Composer Plugin
  • Dependencies
  • Documentation
  • Other

Also thanks for this awesome tool :)

@azjezz azjezz added cli Command-line interface t-enhancement New feature or request labels Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Command-line interface t-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants