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
- Branch
- master
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 5462 Build 5480: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
1,074 ms | ArcanistPuppetLintLinterTestCase::testLinter | |
12,656 ms | ArcanistXHPASTLinterTestCase::testLinter | |
814 ms | ArcanistCSSLintLinterTestCase::testLinter | |
175 ms | ArcanistCSSLintLinterTestCase::testVersion | |
134 ms | ArcanistChmodLinterTestCase::testLinter | |
View Full Test Results (2 Failed · 47 Passed · 4 Skipped) |
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.