You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ansible/vscode-ansible#58 (comment) @aliusmiles reported a discovery he made related to this extention. It causes huge CPU usage because it does open all yaml files inside a repository, which is triggering validations from other extensions.
While I did not look at the code of this extension I suspect that its LSP implementation is faulty as it ends up notifying vscode about file being opened, thus causing a chain effect. The result is of some kind of DDOS nature if repository has >100 YAML files because some validations are very CPU intensive (i know for sure that vscode-ansible requires ~2s per file at minimum).
hey, @ssbarnea 👋 the plugin scans yaml files in the workplace on the startup, so I guess it causes the behavior you described. I don't think you can do anything on your side, but I'd rather make this behaviour optional and disable it by default in the next versions of the plugin.
I'll try to come up with a fix in the next few days.
Thanks for replying. I kinda have a similar problem with my plugin around startup but decided to delay implementation of full scan at start. Maybe we should ask someone as m$ about what is the recommended way to perform a project level linting when the directory is opened inside the workspace. We clearly do not want to make vscode believe the files are really opened (thus affecting any extension that watches for open file event). In my case linting is done be external tool, so I would not need to worry much, I only need to be careful to call it only once for all files instead of once for each file.
In ansible/vscode-ansible#58 (comment) @aliusmiles reported a discovery he made related to this extention. It causes huge CPU usage because it does open all yaml files inside a repository, which is triggering validations from other extensions.
While I did not look at the code of this extension I suspect that its LSP implementation is faulty as it ends up notifying vscode about file being opened, thus causing a chain effect. The result is of some kind of DDOS nature if repository has >100 YAML files because some validations are very CPU intensive (i know for sure that vscode-ansible requires ~2s per file at minimum).
Please install https://marketplace.visualstudio.com/items?itemName=zbr.vscode-ansible and investigate it. That extension will also install the YAML extension which is one of the most popular vscode extension ever.
Based on the line from https://github.com/threadheap/serverless-ide-vscode/blob/master/packages/vscode/package.json#L58 i believe that your extension affects any YAML files and not only those one would believe based on its description. This means that is prone to cause lots of conflicts.
I am the author of the vscode-ansible extension, so please let me know if there is something I can do on my side to address these issues.
The text was updated successfully, but these errors were encountered: