robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
206 stars 93 forks source link

Improve dealing with really big files #682

Open fredrikstahre opened 2 years ago

fredrikstahre commented 2 years ago

Hi,

I installed the plugin on my Mac and it works great but when I installed it on my Windows 11 it's really slow and the auto completion function is not working.

Also how can I change from 4 spaces to tab in auto completion?

Can anyone help me solve these issues?

fabioz commented 2 years ago

Hello, related to being slow/not working, can you provides the logs related to Intellij to be able to diagnose your issue?

See: https://github.com/robocorp/robotframework-lsp/blob/master/robotframework-ls/docs/reporting_issues.md#intellij-logs for details on how to get those.

Related to using tab, do you mean:

image

fabioz commented 2 years ago

Also, on Windows do you have any other extension related to Robot Framework installed? (if you have it's expected that things don't work out as extensions conflict with one another...)

fredrikstahre commented 2 years ago

Hi and thank you for the fast response!

I hope I have attached the log files needed. I didn't find all described in the guide you shared. idea.log intellij-rf-ls-2022-05-16-4180.log

Regarding tabs I have changed the setting you show in your screenshot but still I get 4 spaces instead of tab when I auto complete a suggested keyword.

I have no other plugins installed. But I had another plugin previously, can it be some cache which I need to empty?

Thanks again!

fabioz commented 2 years ago

Humm, related to the tabs in auto-complete that'd really need to be implemented in the language server. Please create a new issue for that.

fabioz commented 2 years ago

Related to the slowness, is the project you're working with too big or do you have files that can be too big themselves?

From the logs I can see many slow requests being logged, but most things seem to be reported inside of the Robot Framework parsing itself (which is a bit strange).

Is this some project you could share?

fredrikstahre commented 2 years ago

Thank you, I will create a ticket for using tab instead of spaces.

You were right, the project is quite big and the problem was one file in particular which have 32 000 lines. It is simulating transactions so it's tough to make it smaller. But when I tested on a different file it worked fine.

Thank you very much for your help!

fabioz commented 2 years ago

I'll reopen it as it may be something to be tackled in the future... I suspect that the parser itself may need improvements to deal with big files like this one.

fabioz commented 2 years ago

As a note, dealing with a single big file is probably more problematic that dealing with many smaller ones as the parse itself is done by Robot Framework in Python.