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

refactor(linter): use a global hashmap to reduce rule timer macro expansion #822

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented Aug 31, 2023

closes #819

@github-actions github-actions bot added the A-linter Area - Linter label Aug 31, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07% 🎉

Comparison is base (777cc00) 92.59% compared to head (55e0c97) 92.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   92.59%   92.66%   +0.07%     
==========================================
  Files         209      209              
  Lines       42777    42777              
==========================================
+ Hits        39611    39641      +30     
+ Misses       3166     3136      -30     
Files Changed Coverage Δ
crates/oxc_linter/src/lib.rs 75.51% <ø> (+18.36%) ⬆️
crates/oxc_cli/src/lint/mod.rs 96.58% <100.00%> (+0.18%) ⬆️
crates/oxc_linter/src/rule_timer.rs 92.30% <100.00%> (+92.30%) ⬆️
...rates/oxc_macros/src/declare_all_lint_rules/mod.rs 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

Benchmark Results

Linux

group                            main                                   pr
-----                            ----                                   --
minifier/antd.js                 1.00    319.8±8.35ms    19.9 MB/sec    1.00    318.3±9.10ms    20.0 MB/sec
minifier/react.development.js    1.00      3.3±0.09ms    21.1 MB/sec    1.01      3.3±0.12ms    21.0 MB/sec
minifier/typescript.js           1.00   550.7±11.14ms    18.7 MB/sec    1.00   552.2±11.96ms    18.7 MB/sec
minifier/vue.js                  1.01     19.5±0.64ms    16.8 MB/sec    1.00     19.3±0.68ms    16.9 MB/sec
parser/antd.js                   1.01    102.5±3.58ms    62.2 MB/sec    1.00    101.3±2.92ms    62.9 MB/sec
parser/react.development.js      1.01  1121.9±31.06µs    61.3 MB/sec    1.00  1111.1±99.71µs    61.9 MB/sec
parser/typescript.js             1.01    174.4±4.16ms    59.1 MB/sec    1.00    173.0±3.83ms    59.6 MB/sec
parser/vue.js                    1.01      7.1±0.22ms    46.0 MB/sec    1.00      7.0±0.24ms    46.6 MB/sec
semantic/antd.js                 1.00    109.8±5.21ms    58.1 MB/sec    1.01    110.6±7.27ms    57.7 MB/sec
semantic/react.development.js    1.01  1048.2±37.92µs    65.6 MB/sec    1.00  1032.8±89.04µs    66.6 MB/sec
semantic/typescript.js           1.00    228.8±7.51ms    45.1 MB/sec    1.00    229.1±8.28ms    45.0 MB/sec
semantic/vue.js                  1.05      6.9±0.40ms    47.3 MB/sec    1.00      6.6±0.32ms    49.5 MB/sec

Windows

group                            main                                    pr
-----                            ----                                    --
minifier/antd.js                 1.00   448.4±19.72ms    14.2 MB/sec     1.12  501.3±206.54ms    12.7 MB/sec
minifier/react.development.js    1.00      4.3±0.32ms    16.0 MB/sec     2.74     11.8±9.52ms     5.9 MB/sec
minifier/typescript.js           1.00   719.1±31.47ms    14.3 MB/sec     1.01   724.2±32.56ms    14.2 MB/sec
minifier/vue.js                  1.00     25.7±2.36ms    12.7 MB/sec     2.45    63.1±44.93ms     5.2 MB/sec
parser/antd.js                   1.08    118.2±7.50ms    54.0 MB/sec     1.00    109.2±6.16ms    58.4 MB/sec
parser/react.development.js      1.20  1327.8±623.65µs    51.8 MB/sec    1.00  1106.3±85.39µs    62.2 MB/sec
parser/typescript.js             1.10    190.7±8.24ms    54.1 MB/sec     1.00   172.6±15.07ms    59.8 MB/sec
parser/vue.js                    1.04      7.4±0.49ms    44.2 MB/sec     1.00      7.1±0.35ms    45.8 MB/sec
semantic/antd.js                 1.06   164.8±34.97ms    38.7 MB/sec     1.00   156.2±11.98ms    40.8 MB/sec
semantic/react.development.js    1.00  1314.1±111.43µs    52.4 MB/sec    1.06  1394.7±110.13µs    49.3 MB/sec
semantic/typescript.js           1.00   314.2±22.61ms    32.8 MB/sec     1.11   347.8±70.67ms    29.7 MB/sec
semantic/vue.js                  1.11      9.6±1.04ms    34.1 MB/sec     1.00      8.7±1.16ms    37.7 MB/sec

@Boshen Boshen changed the title refactor(linter): less a global hashmap to reduce rule timer macro expansion refactor(linter): use a global hashmap to reduce rule timer macro expansion Sep 1, 2023
@Boshen Boshen merged commit 6931451 into main Sep 1, 2023
25 checks passed
@Boshen Boshen deleted the rule-timer branch September 1, 2023 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation slow down and binary bloat for oxc_linter due to heavy macros
2 participants