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

perf(plugin-eslint): lint nx projects in separate processes #651

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

matejchalk
Copy link
Collaborator

@matejchalk matejchalk commented Apr 25, 2024

Closes #629

Tested by executing plugin from dist on code-pushup/portal. Previously, this would crash without NODE_OPTIONS=--max-old-space-size=8192. Now it successfully completes without any memory increase.

Also created follow-up issue for further optimization:

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 eslint-plugin 🛠️ tooling labels Apr 25, 2024
@matejchalk matejchalk added 🔥 performance performance optimization and removed 📖 Project documentation improvements or additions to the project documentation 🛠️ tooling labels Apr 25, 2024
Copy link

nx-cloud bot commented Apr 25, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e365bab. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

Copy link

github-actions bot commented Apr 25, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit 41a95b0 with source commit b2a180e.

🏷️ Categories

🏷️ Category ⭐ Current score ⭐ Previous score 🔄 Score change
Performance 🟡 87 🟡 64 ↑ +22.4
Code coverage 🟡 67 🟡 67 ↑ +0.3
Updates 🟡 69 🟡 69 ↑ +0.2
Accessibility 🟢 100 🟢 100
Best Practices 🟢 100 🟢 100
SEO 🟡 86 🟡 86
PWA 🟡 63 🟡 63
Bug prevention 🟢 100 🟢 100
Code style 🟢 99 🟢 99
Security 🟡 80 🟡 80
Custom checks 🟡 67 🟡 67

🗃️ Groups

👍 3 groups improved
🔌 Plugin 🗃️ Group ⭐ Current score ⭐ Previous score 🔄 Score change
Lighthouse Performance 🟡 87 🟡 64 ↑ +22.4
Code coverage Code coverage metrics 🟡 67 🟡 67 ↑ +0.3
JS Packages NPM outdated dependencies 🟡 69 🟡 69 ↑ +0.2

18 other groups are unchanged.

🛡️ Audits

👍 10 audits improved, 👎 1 audit regressed, 8 audits changed without impacting score
🔌 Plugin 🛡️ Audit 📏 Current value 📏 Previous value 🔄 Value change
Lighthouse Total Blocking Time 🟨 320 ms 🟥 1,330 ms ↓ −76 %
Lighthouse First Contentful Paint 🟩 1.3 s 🟨 2.4 s ↓ −46 %
Lighthouse Speed Index 🟩 1.8 s 🟨 4.1 s ↓ −57 %
Lighthouse Max Potential First Input Delay 🟥 400 ms 🟥 820 ms ↓ −52 %
Lighthouse First Meaningful Paint 🟩 1.3 s 🟨 2.4 s ↓ −46 %
Lighthouse Time to Interactive 🟩 3.2 s 🟨 4.4 s ↓ −28 %
Lighthouse Largest Contentful Paint 🟨 3.1 s 🟨 3.0 s ↑ +3 %
JS Packages Outdated NPM dev dependencies. 🟥 45 outdated package versions (25 major, 14 minor, 6 patch) 🟥 44 outdated package versions (25 major, 14 minor, 5 patch) ↑ +2 %
Code coverage Function coverage 🟨 60 % 🟨 59 % ↑ +2 %
Code coverage Line coverage 🟨 65 % 🟨 65 %  +0 %
Code coverage Branch coverage 🟨 82 % 🟨 82 %  +0 %
Lighthouse Minimizes main-thread work 🟥 2.9 s 🟥 6.0 s ↓ −53 %
Lighthouse Properly size images 🟥 Potential savings of 327 KiB 🟥 Potential savings of 327 KiB ↑ +∞ %
Lighthouse Metrics 🟩 3183 🟩 4410 ↓ −28 %
Lighthouse JavaScript execution time 🟩 0.8 s 🟩 1.3 s ↓ −38 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 467 KiB 🟩 Total size was 467 KiB ↑ +0 %
Lighthouse Uses efficient cache policy on static assets 🟨 14 resources found 🟨 14 resources found ↑ +0 %
Lighthouse Server Backend Latencies 🟩 30 ms 🟩 30 ms ↑ +8 %
Lighthouse Network Round Trip Times 🟩 0 ms 🟩 0 ms ↑ +100 %

504 other audits are unchanged.

@matejchalk matejchalk force-pushed the split-eslint-targets branch from b094fca to e365bab Compare April 25, 2024 11:24
@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🛠️ tooling labels Apr 25, 2024
@matejchalk matejchalk marked this pull request as ready for review April 25, 2024 11:31
@matejchalk matejchalk removed 📖 Project documentation improvements or additions to the project documentation 🛠️ tooling labels Apr 25, 2024
Copy link
Collaborator

@Tlacenka Tlacenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this improvement a lot!

I looked both at the plugin code and the tests.
While there are some generic tests and bigger snapshots of higher complexity, their refactor does not belong to this PR.

@matejchalk matejchalk merged commit c25b367 into main Apr 29, 2024
20 checks passed
@matejchalk matejchalk deleted the split-eslint-targets branch April 29, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 eslint-plugin 🔥 performance performance optimization 🔬 testing writing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run ESLint separately on Nx projects
4 participants