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

Very slow on large amount of projects / Large codebases #171

Open
dakamakat opened this issue Jul 1, 2024 · 12 comments
Open

Very slow on large amount of projects / Large codebases #171

dakamakat opened this issue Jul 1, 2024 · 12 comments

Comments

@dakamakat
Copy link

dakamakat commented Jul 1, 2024

Dont really know why but LSP is getting very slow ( unable to get any diagnostic in file or react on code changes in even 1 min ) on repos with large amount of projects ( smth like 80+ ) i use space station 14 repo to check this

NVIM 0.10.0 Release
csharp_ls installed version 0.14.0

or maybe it's related to my completition plugin but it's now wery likely bc everything same when i disable it ( i use nvim-cmp )

is there anyone who experianced same issue or know workaround for this ( i was expiriencing smth similar with omnisharp as well )

@Wordluc
Copy link

Wordluc commented Jul 1, 2024

i've been experiencing the same for a while now, i have not found anything to solve this.
It takes about 5 minutes

@razzmatazz
Copy link
Owner

I have just implemented pull diagnostics which should help here:

Would you have chance to test it if it helps in your case?

@Wordluc
Copy link

Wordluc commented Jul 3, 2024

i am using Manson to manage lsp so i can't do a manual pull, it works base on version

@ichirou2910
Copy link

i am using Manson to manage lsp so i can't do a manual pull, it works base on version

You can pass custom config to Mason. Something like this:

local config = {
	cmd = { "/path/to/local/csharp-ls" },
}

mason_lspconfig.setup_handlers({
	function(server_name)
		if server_name == "csharp_ls" then
			lspconfig["csharp_ls"].setup(config)
		end
	end,
})

@dakamakat
Copy link
Author

Tested it with latest master ( #174 implemented ) on large repo but seems situation does not changed ( at least for me )
still ~5 mins to load solution ( around 85 projects ) and ~5 min to even start to respond on changes

@Wordluc
Copy link

Wordluc commented Jul 15, 2024

same thing of @dakamakat

@razzmatazz
Copy link
Owner

What interaction you mean by he word "responding"? Is it diagnostics that show up late, or completion item do not appear fast enough?
I am inclined to emit requests stats to stderr periodically in debug mode to find things like these, but it would be nice to know if you have noted a particular functionality that is laggy or just the "entire experience"

@Wordluc
Copy link

Wordluc commented Jul 16, 2024

It takes about 5 minutes to initialize(for large project), and during this time, the LSP doesn't respond, neovim acts like a normal editor without lsp.

@Wordluc
Copy link

Wordluc commented Jul 16, 2024

would be possible to start loading the initial project (where you are currently working) and then extend the loading process to the inner project, enabling the LSP to begin working with it, even if temporarily not with full functionality?.

@razzmatazz
Copy link
Owner

Is there a solution that is being loaded or just multiple projects, sequentially?
I have noticed that having a solution file that references the projects significantly reduces load time. (Presumably Roslyn loads those in parallel)

@Wordluc
Copy link

Wordluc commented Jul 16, 2024

it's a solution with different projects

@Doctor-Cpu
Copy link

Downgrading down to 0.11.0 drastically improves the initial loading time for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants