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 5458 Build 5476: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
983 ms | ArcanistPuppetLintLinterTestCase::testLinter | |
11,639 ms | ArcanistXHPASTLinterTestCase::testLinter | |
645 ms | ArcanistCSSLintLinterTestCase::testLinter | |
115 ms | ArcanistCSSLintLinterTestCase::testVersion | |
136 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.