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

Server startup is slow for 3278 ruby files sized project #164

Closed
Skarlso opened this issue Mar 6, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Skarlso
Copy link

commented Mar 6, 2019

Hi.

I have a project which has 3278 ruby files not including vendor.

I started up vscode and the server startup time after opening a ruby file took ~5 minutes or so.

I have a fairly good laptop with i7 8 cores and such.

What I'm asking is... is this normal? I mean it probably is, since it's parsing every file possible. And after startup everything works smoothly. I'm just curious if this is normal. :)

I've also added this config:

---
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
reporters: []
domains: []
required: []
plugins: []

So vendor should be ignored, right?

Thanks.

@Skarlso Skarlso changed the title Server startup is slow for 3278 ruby file sized project Server startup is slow for 3278 ruby files sized project Mar 6, 2019

@castwide

This comment has been minimized.

Copy link
Owner

commented Mar 8, 2019

That's about what I'd expect from a project of that size, depending on LOC. Here are some recent benchmarks on a Windows 10 PC with AMD 4GHz 8-core and 32 GB RAM:

Files LOC Seconds to load
12 608 2
60 4062 3
178 10989 22
344 43621 23
1122 133320 147

The number of gem dependencies can also have an impact, but the most time-consuming part of initialization is usually indexing the project files.

Load times are an ongoing concern. I'm experimenting with ways to improve it, but right now the best solution is to make sure you limit the included files to the code you absolutely need to index.

I've also added this config:

---
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
reporters: []
domains: []
required: []
plugins: []

So vendor should be ignored, right?

Yes.

@Skarlso

This comment has been minimized.

Copy link
Author

commented Mar 8, 2019

Thanks for the breakdown! Don't worry, I don't mind the bit slow startup. After that it runs just fine.

Usually I get in, start the IDE then go make tea and when I'm back it's all cool. ☕😎

The benefits of using solargraph outweigh this minor nuisance hundredfolds! Never been happier with working with Ruby. 👍

@Skarlso Skarlso closed this Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.