Skip to content

Improve GoToRelevantFile performance #3327

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

Open
jenny-codes opened this issue Mar 19, 2025 · 1 comment · May be fixed by #3526
Open

Improve GoToRelevantFile performance #3327

jenny-codes opened this issue Mar 19, 2025 · 1 comment · May be fixed by #3526
Labels
bug Something isn't working help-wanted Extra attention is needed

Comments

@jenny-codes
Copy link
Contributor

jenny-codes commented Mar 19, 2025

Description

Ruby LSP Information

Parent issue #2966

The GoToRelevantFile function added in #2985 works well with small size repos, but it has a noticeable lag when used on a larger codebase.

Benchmark measurements on the shopify core codebase on my machine

(In order: user CPU time, system CPU time, the sum of the user and system CPU times, elapsed real time)

  0.875498   0.938839   1.814337 (  2.438297)
  0.204476   0.908439   1.112915 (  1.319023)
  1.396747   1.401042   2.797789 (  3.252911)
  3.044789   4.278284   7.323073 (  6.205184)
  2.496724   4.009404   6.506128 (  5.499605)
  2.575118   4.419145   6.994263 (  5.775319)
  2.427883   3.813284   6.241167 (  5.337139)
  2.646134   3.806451   6.452585 (  5.554977)
  1.610006   3.839775   5.449781 (  4.531290)
  3.278136   4.539844   7.817980 (  6.581827)

Different random file are used each time. This is the measurement of the time it takes to run the GoToRelevantFile#perform only.

@jenny-codes jenny-codes added the bug Something isn't working label Mar 19, 2025
@egiurleo egiurleo added the help-wanted Extra attention is needed label Apr 16, 2025
@domingo2000
Copy link
Contributor

domingo2000 commented May 22, 2025

I provided an idea on how this could be optimized without chaning the strategy for finding relevant files that much. The idea is in this PR. ¿Do you have any feedback or other ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help-wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants