Closed Bug 1382647 Opened 7 years ago Closed 7 years ago

Improve performance of searching for globals with the various global rules of ESLint

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

I was planning on fixing globals importing when we're using things like forEach on arrays (bug 1325373), however prior to that I got into looking at the performance of the existing code and seeing if we can improve it.

By a little bit of refining what we're looking for we can generally avoid having to rebuild the source and matching it. This shaves off about 10 seconds from a 2m30 run on my machine.

Whilst it isn't much relatively speaking, it will help builders & potentially others - I still think it is worth doing. Seeing as I will be afk for a bit soon, I though we might as well get it landed now.
Comment on attachment 8888288 [details]
Bug 1382647 - Improve eslint-plugin-mozilla's performance when searching for globals by avoiding rebuilding source when we don't need to.

https://reviewboard.mozilla.org/r/159242/#review164850
Attachment #8888288 - Flags: review?(dtownsend) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfeea9fdf02f
Improve eslint-plugin-mozilla's performance when searching for globals by avoiding rebuilding source when we don't need to. r=mossop
https://hg.mozilla.org/mozilla-central/rev/bfeea9fdf02f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: