Skip to content

test-only: setup to analyze language server#12100

Closed
Sysix wants to merge 2 commits into07-01-refactor_language_server_store_lintservice_instead_of_linter_from
07-06-test-only_setup_to_analyze_language_server
Closed

test-only: setup to analyze language server#12100
Sysix wants to merge 2 commits into07-01-refactor_language_server_store_lintservice_instead_of_linter_from
07-06-test-only_setup_to_analyze_language_server

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jul 6, 2025

Setup:

  • Install heaptrack and probably the cargo counterpart part too. (Only way it worked for me).
  • cd crates/oxc_language_server/fixtures/linter/oxc_resolver_memory_leak && npm i
  • Run cargo heaptrack -p oxc_language_server on the project root
  • Follow the gzip/heaptrack_interpret part outputted
  • Run heaptrack --analyze <outputted-name>. For the GUI, install heaptrack-gui (via apt get)

Result

heaptrack.oxc_language_server.330583.gz

Allocation grows and grows

@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Jul 6, 2025
Copy link
Member Author

Sysix commented Jul 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 6, 2025

CodSpeed Instrumentation Performance Report

Merging #12100 will degrade performances by 30.84%

Comparing 07-06-test-only_setup_to_analyze_language_server (90b4515) with main (4c35f4a)

Summary

⚡ 2 improvements
❌ 24 regressions
✅ 8 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
codegen[RadixUIAdoptionSection.jsx] 133.8 µs 138.9 µs -3.68%
codegen[binder.ts] 4.8 ms 5 ms -3.45%
codegen[cal.com.tsx] 39.4 ms 40.7 ms -3.22%
codegen[react.development.js] 2.2 ms 2.3 ms -3.4%
formatter[RadixUIAdoptionSection.jsx] 308.2 µs 319.2 µs -3.47%
lexer[RadixUIAdoptionSection.jsx] 20.9 µs 24.7 µs -15.23%
lexer[binder.ts] 930.2 µs 1,107.6 µs -16.02%
lexer[cal.com.tsx] 5.8 ms 7.2 ms -19.16%
lexer[react.development.js] 384.2 µs 457.6 µs -16.03%
linter[RadixUIAdoptionSection.jsx] 2.5 ms 2.4 ms +3.21%
linter[cal.com.tsx] 1.2 s 1.2 s +3.08%
minifier[RadixUIAdoptionSection.jsx] 66.1 µs 72.4 µs -8.66%
minifier[binder.ts] 3.5 ms 3.9 ms -11.34%
minifier[cal.com.tsx] 23.3 ms 25.7 ms -9.41%
minifier[react.development.js] 1.8 ms 2 ms -10.23%
estree[checker.ts] 104.6 ms 116.3 ms -10.03%
parser[RadixUIAdoptionSection.jsx] 84.5 µs 89.4 µs -5.53%
semantic[RadixUIAdoptionSection.jsx] 77.5 µs 95.5 µs -18.93%
semantic[binder.ts] 4.3 ms 5.3 ms -17.71%
semantic[cal.com.tsx] 28 ms 34 ms -17.63%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@Sysix
Copy link
Member Author

Sysix commented Jul 6, 2025

@camc314 @Boshen @overlookmotel
Hope this setup will help to identify the problem with the memory usage.
I attached my report for you, maybe you can find there something.

@Sysix Sysix force-pushed the 07-01-refactor_language_server_store_lintservice_instead_of_linter_ branch from 6dcaef8 to eb594bd Compare July 9, 2025 16:30
@Sysix Sysix force-pushed the 07-06-test-only_setup_to_analyze_language_server branch 2 times, most recently from 9f8dc2a to 64d3aeb Compare July 9, 2025 16:33
@Sysix Sysix force-pushed the 07-01-refactor_language_server_store_lintservice_instead_of_linter_ branch from eb594bd to dfe5826 Compare July 9, 2025 16:33
@Sysix Sysix force-pushed the 07-01-refactor_language_server_store_lintservice_instead_of_linter_ branch from dfe5826 to d3a7d65 Compare July 9, 2025 16:35
@Sysix Sysix force-pushed the 07-06-test-only_setup_to_analyze_language_server branch from 64d3aeb to 90b4515 Compare July 9, 2025 16:35
@Sysix Sysix closed this Jul 9, 2025
@Sysix Sysix deleted the 07-06-test-only_setup_to_analyze_language_server branch October 3, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant