-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Not working with NFS mounted projects #64
Comments
Confirmed. The problem appears to be specific to network paths.
I suspect this is a glitch in how the server converts file URIs to paths. Can you confirm whether it works for you with a mapped network drive instead of a network path? |
@castwide hmm, I'm having issues exactly with mapped(mounted) version on osx, ie with: |
The Workspace config was unnecessarily converting paths using The update is on the master branch and will be included in gem version 0.23.0, which I expect to release tomorrow. |
Amazing, thanks a lot! Really eager to try new version! 🎉 |
Published gem v0.23.0. |
Just tried it: it works spontaneously: sometimes |
Hmm. I just tried another test and found an additional issue with Windows network paths that may or may not be related. I'll have to jump back on a MacBook later and give it another try. I suppose there's also a possibility that it's related to network latency, but I would expect those problems to manifest during workspace initialization, not active usage. If you see any error messages in the developer console or any other output that might help identify a root cause, please let me know. |
I've spotted an interesting pattern: nfs activity never stops if I have vscode-solargraph extension enabled and looks like there is no relation between the number of calls and if I'm asking to Btw, not seeing that behavior when just doing |
In VS Code, there are two messages in the status bar at the bottom left: The socket server doesn't start reading the workspace until the client sends the How large is your project? Particularly number of Ruby files and required gems. |
I'm seeing both of these messages but nfs activity is not going down after it is about 30+kloc and 300+ gems |
Are the gems installed on an NFS mount as well? Solargraph reads YARD documentation for gems, which might account for the latency. That could also account for some queries being instantaneous, as YARD results get cached in memory. |
yep, the whole project is on nfs mount. I've left vscode untouched for almost 2 hours, the same level of nfs activity, where 95+% are Instantaneous (less than 3-4 sec) queries are really rare, and only for constants which were looked up already (ie hover on |
Thanks for the detail. I should have time to troubleshoot on a MacBook in the next day or two. |
Today I've tried the last release again, the problem is still there, but I've managed to run dtruss on the server pid to see what it is doing, and found out strange things: it is full of calls like these:
Thousands of lines like that. The important part that it goes through Changing .solargraph.yml to that didn't help: include:
- "app/**/*.rb"
- "lib/**/*.rb"
- "lib_deps/**/*.rb"
- "engines/**/*.rb"
exclude:
- spec/**/*
- test/**/*
- node_modules/**/*
- tmp/**/*
reporters: []
domains: []
required: []
plugins: [] still goes through all these directories for some reason |
Sorry, was to fast. It did help, now hovers are fast and go to definition is less than 30sec ( |
Does the network traffic go down after you receive the I have another suspicion about this problem's root cause, but I'll have to run some tests to see if I can reproduce it. The server should completely ignore files in folders that are globally excluded, e.g., |
@somebody32 Sorry, was too fast myself :) I just noticed what you mentioned about |
Did both sides logs and stats. Here is the whole flow. Server starts
Server is ready
Hover on a constant/go to definition
But because my project is not so small, these last lstats take some time on NFS share and I suspect that is why |
Thanks, that's useful to know. The |
Awesome, thank you! |
Gem version 0.27.0 should require far less filesystem interaction. The language server depends on the client to be the authority for file states, so you should see much less NFS activity after the server is initialized. |
Just tried it, and, unfortunately, I can't confirm that: I still see The good thing is that I've tuned my nfs-setup so it is way faster now and all these interactions usually are less than 5 seconds |
Not sure if I can help anyhow if you're still interested in finding the reason of these file accesses? |
Your activity logs have been way helpful. Unfortunately, it sounds like there's still a use case I haven't reproduced yet. I'm going to keep this problem on my radar internally, but you can close this issue unless you want to receive further updates. Thanks again for your help. |
Extension v0.19.1 and gem v0.31.0 should further reduce filesystem access during normal usage.
|
I can confirm it is way faster now; everything is almost instantaneous. Fantastic, thanks a lot for your work! Will close this issue happily |
I'm using solargraph with VS code and found out that when I open a project from nfs-share go-to-definition/suggest is not working at all (or maybe working but is too slow to verify that), without any errors or warnings in devtools. The same project moved out from the share works perfectly. Any way to help you to identify the problem?
The text was updated successfully, but these errors were encountered: