Speed up the `includes` linter
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Tracking
(firefox161 fixed)
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: ahochheiden, Assigned: ahochheiden)
References
(Blocks 1 open bug)
Details
Attachments
(4 external files, 1 obsolete file)
includes searches each file once per included header, with a regex of all that header's symbols.
| Assignee | ||
Comment 1•22 days ago
|
||
includes searched every file once per included header, with a regex
joining all of that header's symbols. The lint_std_headers and
lint_cstd_headers checks from diskarzhan and the mfbt check all
searched this way. Every symbol is a plain identifier, so the linter now
collects the words of a file once and looks the symbols up in them. The
linter has its own copies of lint_std_headers and lint_cstd_headers,
which read the symbol tables from diskarzhan, and no longer calls the
diskarzhan versions. The results are the same as the regex search. A
whole tree mach lint -l includes on Windows went from 17 to 8 seconds.
Updated•22 days ago
|
Comment 2•22 days ago
|
||
This brings performance improvement to the include linter.
Updated•21 days ago
|
Comment 4•21 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 5•20 days ago
|
||
check_mfbt_headers ran one regex per identifier for every mfbt header a
file includes. Every identifier in mfbt/api.yml is a plain word, so the
check now counts the words of a file once and looks the identifiers up in
those counts. The results match the regex search, and a whole tree
mach lint -l includes on Windows went from 9.7 to 8.7 seconds.
Comment 6•20 days ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Updated•19 days ago
|
Updated•17 days ago
|
| Assignee | ||
Comment 7•17 days ago
|
||
The test read a literal category, which mfbt/api.yml does not have,
so it never checked _KiB, _MiB or _percent.
Comment 8•14 days ago
|
||
This mostly contain speed upgrades, which will benefits our linting
process.
Thanks @ahochheiden for the upstream contribution!
Comment 10•14 days ago
|
||
Comment 11•14 days ago
|
||
| bugherder | ||
Comment 12•12 days ago
|
||
Comment 13•11 days ago
|
||
| bugherder | ||
Description
•