Page MenuHomePhabricator

Allow external linters to operate on multiple paths in batches
AbandonedPublic

Authored by joshuaspence on Feb 14 2017, 3:36 AM.
Tags
None
Referenced Files
F15509057: D17350.id41725.diff
Wed, Apr 16, 9:00 AM
F15481804: D17350.id41725.diff
Tue, Apr 8, 11:05 PM
F15468231: D17350.id.diff
Thu, Apr 3, 9:54 PM
F15464682: D17350.diff
Wed, Apr 2, 12:16 PM
F15418288: D17350.diff
Mar 20 2025, 10:18 PM
F15412556: D17350.diff
Mar 19 2025, 1:40 PM
Unknown Object (File)
Mar 2 2025, 8:50 AM
Unknown Object (File)
Feb 14 2025, 5:43 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Some linters have a high startup cost, such that the time required to start the external tool are unproportionally high compared to the amount of time required to actually lint the file contents. A good example is ESLint, which has been reported internally to be nine times slower when run through arc lint compared to running eslint directly.

I think that the best solution here is to allow paths to be passed to external linters in batches.

Test Plan

This needs some more work, but I wanted to know what @epriestly thought before I continued working on it. With a batch-size of 20, the time required to run arc lint on 60 JavaScript files reduced from 30 seconds to 7 seconds locally.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 15623
Build 20619: Run Core Tests
Build 20618: arc lint + arc unit

Unit TestsFailed

TimeTest
333 msArcanistJSHintLinterTestCase::Unknown Unit Message ("")
Assertion failed, expected values to be equal (at ArcanistLinterTestCase.php:131): Expect one result returned by linter. Expected: 1 Actual: 2
126 msArcanistPhpLinterTestCase::Unknown Unit Message ("")
Assertion failed, expected values to be equal (at ArcanistLinterTestCase.php:131): Expect one result returned by linter. Expected: 1 Actual: 2
10 msArcanistChmodLinterTestCase::Unknown Unit Message ("")
5 assertions passed.
0 msArcanistClosureLinterTestCase::Unknown Unit Message ("")
1 assertion passed.
0 msArcanistCpplintLinterTestCase::Unknown Unit Message ("")
1 assertion passed.
View Full Test Results (2 Failed · 19 Passed · 33 Skipped)

Event Timeline

joshuaspence retitled this revision from Allow external linters to operate on multiple paths to Allow external linters to operate on multiple paths in batches.Feb 14 2017, 4:36 AM

I can just do this with D19730 instead.