Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): a new multi-file analysis runtime #9383

Merged
merged 8 commits into from
Mar 11, 2025

Conversation

branchseer
Copy link
Member

@branchseer branchseer commented Feb 26, 2025

fixes #9077, #7996, #8631.

Results of running oxlint -c oxlint.json on AFFiNE@97cc814a

1.3x slower, takes 0.86x memory.

Before

$ /usr/bin/time -al ../oxc/target/release/oxlint_main -c oxlint.json
[lint error messages omitted]
Found 0 warnings and 3 errors.
Finished in 588ms on 4990 files with 135 rules using 10 threads.
        0.61 real         3.69 user         0.94 sys
           402784256  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
               31315  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                   2  voluntary context switches
                6127  involuntary context switches
         42060793125  instructions retired
         13307821784  cycles elapsed
           398427968  peak memory footprint

After

$ /usr/bin/time -al ../oxc/target/release/oxlint -c oxlint.json
[lint error messages omitted]
Found 0 warnings and 6 errors.
Finished in 764ms on 4990 files with 135 rules using 10 threads.
        0.77 real         4.07 user         1.49 sys
           348061696  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
               31412  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                   5  voluntary context switches
                6625  involuntary context switches
         44886241869  instructions retired
         15977031204  cycles elapsed
           343606976  peak memory footprint

Copy link

graphite-app bot commented Feb 26, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Feb 26, 2025
Copy link

codspeed-hq bot commented Feb 26, 2025

CodSpeed Performance Report

Merging #9383 will not alter performance

Comparing branchseer:fix-linter-module-graph (c818c39) with main (ce810ae)

Summary

✅ 39 untouched benchmarks

dedup pending paths

Use OsStr instead of Path for faster hashing

move file reads to io thread pool

Revert "move file reads to io thread pool"

This reverts commit f4deb10759bd252b0d4bf20c630ed517fd2e582d.

simplify module task scheduling

group

wip

wip

wip

code cleanup
@branchseer branchseer force-pushed the fix-linter-module-graph branch from 5774fc2 to ca69203 Compare March 8, 2025 03:57
@branchseer branchseer changed the title fix(lint): build module graph before running lints fix(linter): build module graph in groups Mar 8, 2025
@github-actions github-actions bot added the A-cli Area - CLI label Mar 8, 2025
@branchseer branchseer marked this pull request as ready for review March 8, 2025 04:10
@branchseer branchseer requested a review from Boshen March 8, 2025 04:11
@Boshen Boshen self-assigned this Mar 8, 2025
@Boshen Boshen changed the title fix(linter): build module graph in groups feat(linter): a new multi-file analysis runtime Mar 8, 2025
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Mar 8, 2025
@Boshen Boshen merged commit 474a57b into oxc-project:main Mar 11, 2025
32 checks passed
Boshen added a commit that referenced this pull request Mar 12, 2025
## [0.15.15] - 2025-03-12

### Features

- 2ddad59 linter: Add unicorn/require-post-message-target-origin rule
(#9684) (yefan)
- 474a57b linter: A new multi-file analysis runtime (#9383) (branchseer)

### Bug Fixes

- 6c0978b linter: No-single-promise-in-promise-methods: do not fix
Promise.all when chained (#9697) (camchenry)
- ab594f1 linter: Turn oxc/no-redundant-constructor-init into
typescript/no-unnecessary-parameter-property-assignment (#9618) (Uli)
- 91c009a linter: Add missing fail cases in
`eslint-no-array-constructor` (#9659) (therewillbecode)
- 2810e5b linter: Add missing fail cases in eslint/no-self-compare
(#9693) (therewillbecode)

### Refactor

- b9ab60b linter: Remove if let nesting from `bad-min-max-function`
(#9722) (therewillbecode)
- 90b0227 linter: Remove if let nesting from
`eslint-operator-assignment` (#9721) (therewillbecode)
- 5ef578e linter: Improve `jest/no-alias-methods` (#9694)
(therewillbecode)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area - CLI A-linter Area - Linter C-bug Category - Bug C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linter: no-cycle rule is unstable
2 participants