Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compilation time takes over 30 seconds for a simple code (Read 2626 times)
maxedthunder
Newbies
*
Offline


Posts: 7
Joined: May 4th, 2023
Compilation time takes over 30 seconds for a simple code
May 4th, 2023 at 9:15pm
Print Post  
I am new to your plugin. Still evaluating it but so far like it. One issue  though so far.

I noticed it takes much longer to compile simple code in VS2022 with vMicro plugin than for example in Arduino IDE or Platformio.

It appears the process spends good 10 seconds or more stuck on "deep search for libraries". 

When I turn that feature off it does not compile so I need to keep it on. 

Is there any optimization that can be done to reduce the compile time (closer to 10 seconds from 30-40 seconds).
  
Back to top
 
IP Logged
 
maxedthunder
Newbies
*
Offline


Posts: 7
Joined: May 4th, 2023
Re: Compilation time takes over 30 seconds for a simple code
Reply #1 - May 4th, 2023 at 9:21pm
Print Post  
BTW - the code includes the following in case this helps

Code (C++)
Select All
#include <Arduino.h>
#include <OneWire.h>
#include "DallasTemperature.h"
#include <WiFi.h>
#include <HTTPClient.h> 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation time takes over 30 seconds for a simple code
Reply #2 - May 6th, 2023 at 2:44am
Print Post  
Thanks for the info. Please install the LATEST version. It gives full control over compiler cache and more importantly which folders are searched for libraries.

You should be able to dramatically reduce the subsequent build times.

New releases

There will be more docs published about all the settings but the example settings should make experimentation easy.

  
Back to top
IP Logged
 
maxedthunder
Newbies
*
Offline


Posts: 7
Joined: May 4th, 2023
Re: Compilation time takes over 30 seconds for a simple code
Reply #3 - May 8th, 2023 at 6:06am
Print Post  
I downloaded the Visual.Micro.Arduino.Studio_2023_0505_2200.vsix file as per your suggestion. After I restart Visual Studio 2022 and go to Tools/ Extensions menu the plugin displays version 2023.220.2205. Is this the correct version??
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation time takes over 30 seconds for a simple code
Reply #4 - May 8th, 2023 at 2:02pm
Print Post  
The RC is out now, it is reccomended. It also enabled some of the new compiler cache options by default. Build times should be improved, especially 2nd build times.

The new release sits in the middle of compiler speed improvements. In most cases, you can also enable options, for a project, to make super fast build.   

The RELEASE is at the top of this list
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
maxedthunder
Newbies
*
Offline


Posts: 7
Joined: May 4th, 2023
Re: Compilation time takes over 30 seconds for a simple code
Reply #5 - May 8th, 2023 at 6:04pm
Print Post  
Tim@Visual Micro wrote on May 8th, 2023 at 2:02pm:
The RELEASE is at the top of this list


How can I confirm the version I have installed? After installing when I go to Tools/Extensions it reports: 2023.220.2205 which does not align with the version in the LATEST version just downloaded which is listed as 23.0507.0
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation time takes over 30 seconds for a simple code
Reply #6 - May 8th, 2023 at 6:51pm
Print Post  
That is the correct version. For vs2022 the version will show as 2023.05.07.220

Last three digits: The 22 signifies vs2022 with minor version of 0. The numbers are formatted so that we don't have future problems with the ms gallery version control.

If your build is still slow please post output with 1) rebuild and 2) build

Thanks
« Last Edit: May 8th, 2023 at 6:52pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: Compilation time takes over 30 seconds for a simple code
Reply #7 - May 17th, 2024 at 10:19am
Print Post  
The latest version (2024.0510.0) has the new Deep Search option available which should reduce the build time when it is enabled, and can be downloaded from the forum, or via Extension Manager in VS2022.

If you select the vMicro > Compiler > Deep Search: Libraries + Accurate Prototype Insertion (SCons) option, it should speed up the time it takes Deep Search to execute.

This is the first version of this new approach, and currently it does not cache its' results, so there are still further improvements to come.....

Any feedback as always is welcome.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint