-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Indexing/building performance issues #714
Comments
I'm getting performance issues with RC3 on MacOS that are resolved by restarting the IDE. I'll check to see if memory/cpu usage trends upwards. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Getting similar behavior, the IDE is extremely slow, and keeps indexing/building and take system resources while doing it, during this time the IDE stops error checking or keeps showing error on code that has no syntax errors. For now it's so slow and unusable that I have to use another IDE to write code, when I'm done I copy it to Arduino and compile! |
I’ve gone back to version 1.8.3 of the ide. Yes, I’ve lost all the new features, but at least it doesn’t slow down so much. This is a real barrier to release. |
I'm in the exact same situation unfortunately. I don't like using the old IDE because it's not got many of the niceties that I've grown to expect over the past decade with other IDEs and editors (VS Code really spoiled us) so it slows me down; sadly the new one slows me down in another way. |
Same problem here on Fedora linux; editor turns unbearably slow after 50 lines of code or so; just keeps indexing and intellisense stops working. VS Code works like a charm with the arduino extension installed. Just to sort out some misconfiguration, I added a new user on my system and ran a freshly downloaded ide from there, same problem. Let me know if I can do something to look into this, the ide looks promising, but is unusable as it is:-( |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
For me the issue got solved by renaming all directories (also hidden directories) containing any reference to arduino installed items. Uninstalling Arduino still left some directories (for future reuse?). |
I always do a clean install (delete the Arduino IDE folder and create a new one) and the problem still persists. |
I got a brand new laptop a couple of months ago and installed this on it as one of the first pieces of software - there was no difference for me either. |
The same for me, but with ESP32 it takes much less time for the editor to become "stuck" due to the fact that the chip supports WiFi and Bluetooth. Because of that even a blank sketch with WiFi enabled takes 630KB on flash after compilation. So a lot of code is recompiled compiled every time I make the slightest change in my .ino file. I have a proposal: please add an option to only execute language server after quicksave/manual save. And/or the option could also be "Maximum frequency of Language Server updates", which would allow the user to limit the language server to re-index/re-build only once every 30 seconds (depending on how complex the sketch is, that is up to the user, hence the flexible duration). There is a plethora more ways to make it more controllable by the user, but one or both of these should at least make it much more bearable to work comfortably with the Language Server running in the background. The biggest issue is that the editor rushes to recompile everything on each character type in the editor. I tried disabling auto save, but nothing changed. I believe this is simply wasteful to trigger recompilation on the tiniest change in code. Sure, if the code you changed wasn't verified yet, you won't be able to see your changes in tool-tips and suggestions, but it makes much more sense to give the programmer the choice when to re-build the code. Considering that Arduino IDE 2.0 compiles in single-core, seems like it places those indexing/building tasks in queue. So if you type, then pause for a couple seconds, then type again and do so for like 10-20 characters, that's it. The language server queue is overwhelmed and you're never getting your suggestions and have to work with a super-sluggish editor. Having a powerful 16-core CPU AMD 5950X and 64GB RAM makes no difference compared to my i7 2600K/16GB due to this queuing behavior of a single-core editor. Adding a switch to only re-index/re-build the sketch on save will also help with editor completely freezing when it's in such an overwhelmed state and you open another project window. For me in 95% of cases this guarantees complete IDE freeze in 5-20 seconds for both windows. Sometimes it's so bad, the OS becomes unresponsive. Not a single other app I use does this. tl;dr; Please add an option to re-index/re-build the sketch only on save (manual or auto). This way one could change auto-save to happen only once a minute and the editor would have plenty of time to finish the re-index/re-build process even for monstrously huge tool-chains like the one for the ESP32 chips. And/or the setting to limit how often (in seconds) the language server can re-index/re-build the sketch in the background with only one process per sketch active at a time. And thank you for a very useful editor which is available for Linux unlike VCode. OS Linux Mint 19.1. In the mean-time: a workaround for those who want to be able to comfortably work in the editor:
Boy oh boy does disabling the language server make a difference when you have to type in a whole new method or a class without having to worry about slowing down the IDE more and more with each key press! I would also recommend to set up keyboard shortcuts for this. Mine are CTRL+SHIFT+0 to stop and CTRL+SHIFT+1 to restart the Language Server (File > Advanced > Keyboard Shortcuts). In fact, the first thing I do when opening any project in Arduino IDE is disable Language Server. I only enable it when I'm lost and need suggestions and automatic reference discovery, and then disable it as soon as I get my answer. |
I'm also facing this issue on a Ryzen 5 2500u laptop with 8GB of ram with over 30% CPU continuous usage and between 1 and 1.5 gigs of ram for the "Arduino IDE" process on Windows 10 using IDE 2.0.0-rc6. This happens with Nano, Uno and Mega despite the sketch size. Having multiple instances of the IDE open at the same time do not degrade performance by a lot more. |
ptillisch asked If I can provide detailed information about my system I'm using a 16GB RAM 2TB-SSD Lenovo Thinkpad Tablet Gen.2 Example: I use the software mailstore Home Gerätename X1-Tablet-16-2 Edition Windows 10 Pro I have installed additional boards Arduino15-Dirlist.zip Both have about 40.000 lines = files I'm using F-Secure 2022 as the internetsecurity suite. You should make Stop Language Server the default
quote of user ptillisch at Arduino.cc
This makes me think: |
- Debounced the connectivity status update. - Silent the output channel for the Arduino LS. - Delay the problem markers update with 500ms. - Do not update the status bar on every `keypress` event. - Debounced the tab-bar toolbar updates when typing in editor. - Fixed electron menu contribution binding. - Aligned the editor widget factory's API to Theia. - Set the zoom level when the app is ready (Closes #1244) - Fixed event listener leak (Closes #1062) Signed-off-by: Akos Kitta <[email protected]>
I appreciate your help, @xinkiknix ❤️ Could you please tell me how did you try to compile the sketch? What did you do? I pushed two minor fixes for the VS Code extension (see the commit ref here). Could you please uninstall the test VS Code extension ( Thank you! |
So as an affected user running linux, apart from the vscode test which I have done (I could not reproduce the issue there so far), what can I do? -I tried running the Arduino IDE's profiler. It doesn't work on linux and indefinitely hangs on "processing" after stopping the recording (I waited for the "processing" to finish for a couple of hours to no avail) @kittaakos as a fellow German wouldn't have any timezone issues with me. |
- Debounced the connectivity status update. - Silent the output channel for the Arduino LS. - Delay the problem markers update with 500ms. - Do not update the status bar on every `keypress` event. - Debounced the tab-bar toolbar updates when typing in editor. - Fixed electron menu contribution binding. - Aligned the editor widget factory's API to Theia. - Set the zoom level when the app is ready (Closes #1244) - Fixed event listener leak (Closes #1062) Signed-off-by: Akos Kitta <[email protected]>
- Debounced the connectivity status update. - Silent the output channel for the Arduino LS. - Delay the problem markers update with 500ms. - Do not update the status bar on every `keypress` event. - Debounced the tab-bar toolbar updates when typing in editor. - Fixed electron menu contribution binding. - Aligned the editor widget factory's API to Theia. - Set the zoom level when the app is ready (Closes #1244) - Fixed event listener leak (Closes #1062) Signed-off-by: Akos Kitta <[email protected]>
I did run the test on Friday, and did some testing during the weekend and today (running nightly build).
That is it for today... |
I think this may be helpful. |
I have been testing the latest nightly build (02/08) and am satisfied with the behaviour, Things run smoothly with very low CPU usage. I still have CC1plus.exe and xtensa-esp32-elf-g++.exe for the respective boards (as they are not digitally signed) as exceptions in my AV. For me this looks it behaves as one would expect. |
I have been testing rc9.1 for a short while now. I usually expect slowdowns after less than 10 minutes of use. I will be using Arduino IDE during the next days and will report back if any slowdowns occur. If you don't hear back from me until Friday, this is completely gone on my end. I am very happy with this. Thank you for your continued efforts. |
I would like to say thank you to all who helped us with the verification and testing of the Arduino language features. You're great. 🙏 I will keep this issue open for some time and will close later when no critical issues pop up.
This is done by the Arduino CLI.
Here is the code. An example URI of a temp folder
|
Indeed, the latest nightly (20220805) runs very well for me now also. I've been testing it for a few hours today, on the same weak laptop as in December. Memory usage for the IDE always stays below 500MB and CPU under 5%. A huge improvement! @kittaakos your latest fixes seems to have been a success! Many thanks! The IDE 2.0 is good for daily use now =D. By the way, is it possible to manually trigger an indexing without doing a verify? Sometimes they don't seem to trigger. Not a big issue though, since it happens very rarely. |
Everything is very fast now, great work! |
After almost a week with hours of use I can now definitely confirm that any performance issue is gone for me! |
well, I just installed IDE 2 official release Editor is unusable, just clicking somewhere takes about 1 second for the cursor to appear! Typing some text (even comment text) has a terrible lag and some characters even get lost. If I create a new sketch and type junk into a comment I see Indexing n/85 alternating with "Building sketch" and this is with essentially an empty sketch. Task manager shows IDE using 660Mb of memory with an empty sketch. Edition Windows 11 Home |
Today I excluded the temp file folder where the temp files are written and that made the IDE responsive again. We absolutely need an option to reindex on demand rather than on every keystroke. Most users are not going to be able to find this thread and parse out what has to be done to make the IDE usable. |
I'm guessing all the fixes made here in the pre-release-version did Yes all this is voluntary and for free. This means there is absolutely no pressure for a certain release-date. Go on testing un-released beta-testing until the more special systems like DaleSchultz ones reports "runs flawlessly" |
@StefanL38 I already explained to you that this sort of evidence free wild speculation is not appropriate here. The code is open for anyone to see exactly what is in the release. If you have clear evidence that a fix somehow went missing, then you can provide that evidence. If you don't have that evidence, then you would be better to keep quiet because you only waste all of our time and make yourself look the fool. |
As a data point, I had the original problem with performance issues the more I used it. But, since rc9.1, every release has been running fast using minimal system resources on my 11-year-old laptop. I also have an entire college class using V2.0.0 with no performance issues. |
I am happy with version 2.0.0 no (major) issues, excellent performance. Using multiple instances with loads of tabs and no performance impact. Fit for purpose!!! |
Describe the bug
(all the CPU and RAM usages are for the IDE 2.0 process)
To Reproduce
Workaround
Restart the IDE every 30min
Hardware/Software
Additional context
Possibly related issues:
#431
#709
The text was updated successfully, but these errors were encountered: