Skip to content

Improve GoToRelevantFile performance #3327

Open
@jenny-codes

Description

@jenny-codes

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 (400k files count) 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions