Investigate and improve performace of mach lint for Android
Categories
(Firefox for Android :: Tooling, enhancement)
Tracking
()
People
(Reporter: adhingra, Assigned: adhingra)
References
(Blocks 1 open bug)
Details
(Keywords: leave-open, Whiteboard: [fxdroid][group6])
Attachments
(4 files)
Currently AGP lint takes 15+ minutes to run locally and similar on taskcluster. After some invetigation, most of the time (10+ minutes) goes in the actual lintDebug task, even when all other tasks are UP-TO-DATE. Using https://github.com/google/android-lint-performance-probe, the report generated shows that again most of the time goes in LintDriver task (1194589 ms) with next task taking (23083 ms).
The LintDriver is the engine that drives the entire linting process. Before the individual detectors can look for errors, the LintDriver has to parse all your Java/Kotlin code into a Universal Abstract Syntax Tree (UAST) and perform full type resolution. Because of how the Android Lint tool is architected, all of this heavy lifting (parsing, indexing, and type resolution) is logged under LintDriver. The individual detectors just traverse the already-built UAST.
To start-off, we can make it so fenix-linter doesn't run the lint tasks on components. When running mach lint, we already ignore the reports generated by AC lint tasks, but still run the gradle tasks. Skipping AC lint tasks in fenix linter brings the time down to 7 minutes locally. the same change saves about 3+ minutes on taskcluster. Taskcluster will still run all linters, including AC lints and locally we can still run mach lint -l android-ac linter as they normally would to catch lint issues in AC
| Assignee | ||
Comment 1•1 month ago
|
||
When running fenix lint, we already ignore the reports generated by AC lint tasks, but still run the AC lint gradle tasks. Skipping AC lint tasks in fenix linter brings the time down to 7 minutes locally. the same change saves about 3+ minutes on taskcluster. Taskcluster will still run all linters, including AC lints and locally we can still run mach lint -l android-ac linter as we normally would to catch lint issues in AC
before: https://scans.gradle.com/s/pi7nzxvjlpyxc
with change: https://scans.gradle.com/s/7h5w4m3ug47gc
| Assignee | ||
Comment 2•1 month ago
|
||
| Assignee | ||
Comment 3•1 month ago
|
||
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 4•1 month ago
|
||
Updated•25 days ago
|
Updated•25 days ago
|
Updated•25 days ago
|
Updated•14 days ago
|
| Assignee | ||
Updated•4 days ago
|
Comment 6•3 days ago
|
||
| bugherder | ||
Description
•