-
Notifications
You must be signed in to change notification settings - Fork 7
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
Slow plugin #172
Comments
Hi Paul, I'm happy to look into this for you. Do you have a specific project I might be able to reproduce with? |
Hi! Can you send telegram nickname? |
|
Shared the spark access 🫡 |
Received thanks guys. I'll start doing some profiling over the next week. |
@JoshuaBatty this "loading" appears very often and hinders development, |
@JoshuaBatty Hello. The plugin is terrible.. I compile my contract with no errors and see this in my editor... |
Hi @PaulZhemanov please know we are aware of the issue and that we are working on this as a priority. We will hopefully have a fix soon. The TLDR of the issue is the compiler is crashing due to the garbage collector not working properly for certain types. When this happens it also crashed the server plugin, leading to the screenshots. Reloading the window will allow it to work again until the next time the GC <> compiler become out of sync. Obviously this is very frustrating for users and we are looking into a fix. |
If you want a quick fix you could checkout my then run |
Hey @chlenc & @PaulZhemanov we have fixed the Garbage collector and LSP issues. This has been merged and is in the latest 0.54 release. It's still going to be slow to respond due to the lack of granular caching and the size of your workspace, but it shouldn't be crashing and become non-responsive now. We're now looking at further optimisations. |
gm guys thank you!! Btw is it possible to somehow disable reentrancy warnings? |
Sorry i've been out sick this week. We don't off the ability to disable certain warning types but we could look at adding that in the future. I'll take a closer look at this next week and see what we might be able to do. |
Hi @JoshuaBatty . I got this notification and plugin doesnt work. |
Hi @JoshuaBatty . how can I disable these settings
|
Hi Paul what version of forc-lsp are you using? The garbage collection issue has been resolved and is in the latest release. |
Hey @JoshuaBatty, how to update forc-lsp to 0.54 if I'm using the |
@JoshuaBatty forc-lsp 0.49.3 |
I would suggest the quickest way to get it working would be to checkout the sway repo and follow the below commands to get the server updated.
then running the
|
Gm guys Are there any updates?? |
The main issue here is that our compiler is slow and we lack a caching system to support more incremental compilation. We are focusing on improving compilation speeds at the moment, in-fact we have merged 3 PR's in the past 24 hours that have improved compilation speeds by ~60%. We are also in the process of putting together a design for implementing more granular caching. Unfortunately, until the compiler is optimised and caching support is implemented then the language server performance is going to be sluggish on large projects like the spark repo. I'll keep you updated as we go. |
## Description This PR implements a typed module caching system for the compiler when interacted with from the language server. The main goal is to improve performance by caching typed modules and reusing them when possible, reducing unnecessary recompilation. ## Key Changes - Introduced `CowCache` for efficient, thread-safe caching with copy-on-write semantics - Implemented typed module caching in the `QueryEngine` - Updated `ServerState` and `Session` to utilize the new caching system ## Performance Improvements These changes show promising performance improvements in processing didChange events, particularly for larger projects. Here are some benchmarks using the FUSD libraries Sway project (19 Sway files): | Build | Before | After | Improvement | |-------|--------|-------|-------------| | Debug | 448.25ms | 123.73ms | 72.4% faster | | Release | 103.83ms | 53.59ms | 48.4% faster | These improvements should lead to a more responsive development experience, especially when making frequent small changes. closes #6228 improves: FuelLabs/sway-vscode-plugin#172 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
Another update, we now have support for caching at the file level rather than the previous project level. This should speed up response times substantially for projects with lots of files. We have plans to enable caching at the AST node level but this should be a nice bridge in the meantime. |
Hi guys! I'm having trouble getting the plugin to work correctly. It works so slowly. I need correct autocomplete, go to definition, hinting of function signature and arguments. Help me please.
The text was updated successfully, but these errors were encountered: