Sysprogs forums › Forums › VisualGDB › extremly slow compiling
- This topic has 9 replies, 4 voices, and was last updated 1 year, 3 months ago by support.
-
AuthorPosts
-
August 29, 2021 at 14:12 #31221marekParticipant
Hello,
I had a problem with compilation, it was slow. After searching for solution and no idea what I can do. I decide to uninstall everything (Visual Studio, Visual GDB).
Then I install all tools again, and during compilation, the CPU usage can drop to 2.2%! It’s extremely slow. A basic project need 7min to compile
I work with ESP32. What can I do to speed it up?
Best regards,
Marek
Attachments:
You must be logged in to view attached files.August 29, 2021 at 17:54 #31223supportKeymasterAccording to our records, your support has expired a while ago. Please kindly renew it via this page and try installing the latest VisualGDB 5.6 Beta 4. If the problem persists, please let us know and we will help you get it working.
August 31, 2021 at 07:11 #31233marekParticipantMy licence was renewed, new version of visual GDB was installed. And compilation still took long lime, while CPU is used in few percent.
August 31, 2021 at 09:12 #31234supportKeymasterThanks for renewing your license. The slow build might come from the GNU Make tool used by the ESP32 projects. Please make sure your project uses CMake and Ninja, and not the legacy GNU Make. You can recheck it via VisualGDB Project Properties -> CMake Build Settings.
If this doesn’t help, please try exporting the configuration and build command lines from VisualGDB to batch files as shown here. Does running them manually also result in a slow build?
August 31, 2021 at 11:11 #31235marekParticipantAugust 31, 2021 at 11:14 #31237supportKeymasterHi,
This is an Arduino-based project and not an ESP-IDF-based one. Arduino projects use the Arduino build system that can be considerably slower than CMake+Ninja.
Either way, you can try building the project outside VisualGDB as shown here: https://visualgdb.com/documentation/projects/arduino/#troubleshooting
May 13, 2023 at 05:20 #34237matstumpfParticipantHi! I’m facing the same problem.
Arduino-based ESP32-CAM_AiThinker.
I have a Core i9-12900KS, 64gb ram ddr5, ssd 7000mb+, w11, so it should not be slow, but inside Visual Studio it takes about 1:30-2min to compile my sketch.
Using the “Dump Command Line to Batch File” .bat took 16 seconds.
I copied the command on the VisualGDB output and run it directly on arduino-builder.exe cmd (C:\Users\mats-i9KS\AppData\Local\VisualGDB\Arduino), and it takes less than 15s.
I also tried to open the sketch on Arduino IDE and it also take about 15s.
I tried to add -jobs 24 but still the same, my processor stays in about 5% of use, tried to disable Microsoft Antivirus and no luck.
- This reply was modified 1 year, 6 months ago by matstumpf.
Attachments:
You must be logged in to view attached files.May 13, 2023 at 09:36 #34240supportKeymasterHi,
Does the build produce a lot of output, particularly very long lines? If yes, could you please attach the raw output (from running the .bat file with output redirection)?
Also, could you double-check that Visual Studio doesn’t show any errors about the VisualGDBNative module when you open the project for the first time? It implements a few optimizations, namely a fast regex parser used for build message translation.
August 14, 2023 at 08:36 #34582anatcarlsonswParticipantI thought i would add to this. I am on a recent i7 with 16GB RAM and an SSD and by chance have recently re-installed Windows so it’s nothing related to other tasks.
I have built a fairly small project (which we’ve actually streamlined a bit) with the following output size:
Used DATA_FLASH: 141KB out of 8192KB (1%)
Used INSTR_FLASH: 547KB out of 3264KB (16%)
Used INSTR_RAM: 86KB out of 128KB (67%)
Used DATA_RAM: 35KB out of 320KB (11%)
Used Unknown: 16 bytesThis took 9 minutes 50 to build which seems like an awfully long time. I am aware Visual Studio is a behemoth that makes you pay for its convenience but I feel this is compiler based since it’s only seems to build on one core (though some of the preprocessor stuff looks to build on multiple cores). Am I missing a setting which optimises this.
Kind thanks
August 14, 2023 at 08:48 #34583supportKeymasterHi,
Our advice would be the same as to the previous posters: please try building the project outside VisualGDB. If you are not sure how to do that, please let us know the project type (Arduino, ESP-IDF, MSBuild, GNU Make, CMake, etc). and we will point you to the relevant documentation.
If it also takes forever, the issue is not due to VisualGDB and could be caused by the antivirus, defective SSD, or CPU being used by something else. We can suggest a few things to try if this is the case.
If if builds really fast outside VisualGDB, but slow with VisualGDB, it could be due to VisualGDB’s parsing of the long output lines, or due to different antivirus settings or environment. The first thing to check would be whether the build output contains many lines.
-
AuthorPosts
- You must be logged in to reply to this topic.