extremly slow compiling

Sysprogs forums Forums VisualGDB extremly slow compiling

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #31221
    marek
    Participant

    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.
    #31223
    support
    Keymaster

    According 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.

    #31233
    marek
    Participant

    My licence was renewed, new version of visual GDB was installed. And compilation still took long lime, while CPU is used in few percent.

     

     

     

     

    #31234
    support
    Keymaster

    Thanks 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?

    #31235
    marek
    Participant

    I have no CMake Build Settings option.

    Going with instruction from here  I have only “Reload Project” no “Reload CMake Project”

     

     

     

    Attachments:
    You must be logged in to view attached files.
    #31237
    support
    Keymaster

    Hi,

    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

    #34237
    matstumpf
    Participant

    Hi! 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 ago by matstumpf.
    Attachments:
    You must be logged in to view attached files.
    #34240
    support
    Keymaster

    Hi,

    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.

    #34582
    anatcarlsonsw
    Participant

    I 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 bytes

    This 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

    #34583
    support
    Keymaster

    Hi,

    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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.