Ref T7892. Memoize paths returned from ARcanistLinter::getPaths() to improve runtime performance.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T7892: Investigate lint performance issues
- Commits
- rARC46ce8a5a35f9: Memoize paths
Wiped ~0.5 seconds off the total time to lint rARC.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think these need to be properties ($this->filteredPaths), not statics, because a lint engine may instantiate several copies of some subclass but they might conceivably be configured to filter different paths. For example:
$linters[] = new X()->setRunOnDirectories(true); $linters[] = new X()->setRunOnDirectories(false);
Then just set $this->filteredPaths = null; in setPaths() to wipe the cache.