IDE has high resource usage and "Rename Symbol" feature doesn't work for occurrences off screen

Unfortunately the IDE is heavily buggy and using so much resources.
It is literally kicking the air with its little feet when it comes to ESP32 projects.
It can not manage symbol tables etc. so forget about renaming, refactoring.
Even during renaming a local variable in a function, it forgets to rename the variable instances which are not visible on screen if the function is longer than visible part of the editor...
Keeps scanning, loading for symbols for a (loong) time, then seems to work proper, then it gives up.

My Config:
Monster TULPAR T7 v21.9 Laptop:
Win 11 pro,
intel i7-12700H,
32GB RAM,
2x 512GB SAMSUNG SSD,
NVidia RTX 3070Ti Laptop GPU.

Your post has been split off into its own topic

Exactly which version of the IDE do you have installed ?

Your experiences to not match mine when using IDE 2.3.2. In particular I have no problem in renaming variables throughout a sketch whether or not they are visible on the screen. Exactly how are you doing the renaming ?

1 Like

Sorry to omit. The IDE version is 2.3.2.
image
Do I have to use change all occurences?

This is taking forever...
image

And then it randomly works or does not work at all for symbol information. Which is taking me back to 42 years back, before the IDE era, when I started programming on sinclair spectrum etc :D...

I usually use Ctrl+H to rename all occurrences

1 Like

Well that is not an option for an IDE to do symbol renaming or refactoring.
A symbol is bound to scopes, find and replace ignores scopes.
Imagine using same name in two different scopes, which are not related:
for instance, a MySubDevice class variable public: String name;
and a function local variable String name;
IDE concept is invented for such things.
Afterall Find and replace is present in all editors.

Any solutions in the horizon?

@ptillisch

Ok, I tried 2.3.2 appimage after 1.8.19 stopped working after an update yesterday. I can't say I'm impressed at all - to be honest, I id not expect to be. List of things I did not find a way to work around:

  • While it recognizes most of the libraries from 1.8,19 installation it fails miserably on others (e.g. TimerOne.h)
  • AVR old bootloader is gone. Is this to prevent chinese "clones"?
  • On todays widescreen displays the menubar and toolbar take away too much space.
  • tiny fonts everywhere. Scaling the UI to 150 or more helps, but then the editor window shrinks to ~ 20 lines.
  • Dark theme that is not dark nor high contrast.
  • And after all, the IDE is sluggish and slow bejond usability.

In the end I deleted the Appimage and I'm back to Makefiles + arduino-cli + good editor.

1 Like

Still there for me (2.3.2)
image

How much darker than black can it get ?

image

You are running dark with high contrast. Why is the menu color black on white background? Why do you have 125% line height? Why is not important information (icons, tabs) visually dominant? Why is there so much wasted real estate? Why is the font mushy and washed out - and worst, low contrast?

You have the option of defining your own theme if you want to. See Personal themes

Personally I find that the Dark High Contrast in the IDE suits me

I could probably work around the visualy unpleasing parts - as long as that's themeable - but it's an uphill battle. The sluggishness of the GUI will not change whatsoever, so my motivation for getting into 2.x after giving it another shot is ... not that big.

How about the ability to see function and variable definitions, even in libraries, with a click of a button and autocomplete, particularly or functions with a complicated list of parameters ?

Nice, but not a killer-feature. There's a package called "arduino-ctags" which offers this ability to any ctag aware editor.

Hi @ivtore. Thanks for your report.

Do you have any non-ASCII characters in your Windows username or other parts of the path under which the Arduino libraries, boards platforms, and/or system temporary folder are located?

I ask because a bug was recently discovered that causes the compilation caching that normally greatly improves performance after the first compilation for a given board and sketch to not work if the library or cache paths contain non-ASCII characters. There are of course other potential causes of unexpectedly poor performance but I thought it worth checking since this particular cause is easy to positively identify.

I gave it a try and "Rename Symbol" worked fine for references to a local variable that were outside the visible editor area.

Please provide detailed instructions I can follow to reproduce the fault and I'll investigate further. Does the fault only occur with a very complex sketch, or can you reproduce it even with a simple sketch like this?:

void setup() {
 int foo;
  // many blank lines
  foo = 42;
}
void loop() {}
1 Like

Works fine for me:

Maybe you installed the TimerOne library to the libraries subfolder of the Arduino IDE 1.8.19 installation folder instead of under your sketchbook?

Arduino IDE 1.8.19 comes with a collection of fundamental libraries bundled with the installation. Unfortunately the practice somehow developed in the Arduino community of installing additional libraries in that location, and this approach is even used in the installation instructions in some 3rd party library documentation and tutorials. Obviously Arduino IDE 2.x is not going to recognize any libraries that are installed under the Arduino IDE 1.8.19 installation folder.

No, it's installed in sketchbook/libraries. But I'm on Linux.

I fought a lot for that during windows installation process.
My username is IVT in the system.
Microsoft kept begging me to install with a logon into microsoft account.
If I do that It creates a ****ed up username from e-mail instead.
So I do not use M$ account.
It is still begging... :slight_smile:
Additional info:
I only use "esp32 by espressif systems 3.0.3" installed on board manager.
My projects are in D:\Projects, all with names in english. The only tricky thing with them are they may be mixed lower upper case strings i.e.:
D:\Projects\DeviceProject\Hardware\Hardware.ino
Also I use multiple files now, and the editor management of multiple .ino files are somehow weird. (I use numbers in the file names to prioritize them).