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
Hot Topic (More than 8 Replies) Desperately long compile times (Read 4311 times)
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Desperately long compile times
Apr 22nd, 2023 at 12:31pm
Print Post  
Hi,

I'm trying out a SquareLineStudio LVGL project and the compile times are ridiculously long when making any changes.

Typically it's close to 4 minutes when I make a single change in the loop function.
It seems  almost everything is rebuilt every time, which seems crazy.

I have high speed parallel builds and Shared cash for cores both enabled.

I've attached the verbose compile output.
Using ESP32S3 dev module.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Desperately long compile times
Reply #1 - Apr 22nd, 2023 at 7:00pm
Print Post  
edit

The esp32 toolchain is a bit slow and that library is huge. It's 65 secs for me after 1st or full build. 23secs in the next release of vm

Your output suggests the builder thinks that has been a change to the lvgl library sources. Are you altering any sources in the lib?
« Last Edit: Apr 23rd, 2023 at 2:56am by Tim@Visual Micro »  
Back to top
IP Logged
 
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Re: Desperately long compile times
Reply #2 - Apr 23rd, 2023 at 4:36am
Print Post  
No, nothing at all. I just change a value of one variable to test in the loop.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Desperately long compile times
Reply #3 - Apr 23rd, 2023 at 1:31pm
Print Post  
Send us a zip of your project by email or a simple test version here. We don't see same.

Maybe related to build_opt.h
« Last Edit: Apr 23rd, 2023 at 2:14pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Re: Desperately long compile times
Reply #4 - Apr 25th, 2023 at 11:42am
Print Post  
Hi, I sent the zip file a couple of days ago - any update?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2709
Joined: Feb 13th, 2019
Re: Desperately long compile times
Reply #5 - Apr 25th, 2023 at 11:50am
Print Post  
Can you try the latest version of Visual Micro (23.0424.0) available from the top of the board below?
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Re: Desperately long compile times
Reply #6 - Apr 25th, 2023 at 4:57pm
Print Post  
It has improved a lot. Still 2 minutes 10 seconds for a rebuild. Deep search takes 70 seconds approx. 

I'm running on an Intel i9 processor with a ssd and lots of ram so it's not a slow machine.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Desperately long compile times
Reply #7 - May 6th, 2023 at 2:45am
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
 
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Re: Desperately long compile times
Reply #8 - May 6th, 2023 at 3:20am
Print Post  
WOW!!!

That makes a HUGE difference, on an lvgl project it's down to under a minute for a rebuild.

On a different project it's down from over 2 minutes to 10 seconds for a rebuild.

At last sensible rebuilds - thank you!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Desperately long compile times
Reply #9 - May 6th, 2023 at 2:13pm
Print Post  
Great thanks for the speedy feedback.

I think you could probably get the lvgl 2nd build down to 10 or 20 seconds with the following board.txt changes

change the lib-in-lib to:-
vm.preproc.lib-search.lib-in-lib=none

Change the lib-in-sketch to:-
vm.preproc.lib-search.lib-in-sketch=ino-code-only

The only thing those properties affect is which libraries can be discovered. If you have #include for a lvgl lib header in your .ino code then the library will be discovered along with any libraries it references. I think the lvgl uses Wire.h. Therefore, you should see that the Wire library is automatically discovered and linked, in which case all the other processing was a waste of cpu power.
« Last Edit: May 6th, 2023 at 2:26pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2709
Joined: Feb 13th, 2019
Re: Desperately long compile times
Reply #10 - May 17th, 2024 at 10:15am
Print Post  
The latest version (2024.0510.0) has a 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
 
Acuario
Senior Member
****
Offline


Posts: 256
Location: Spain
Joined: Aug 28th, 2015
Re: Desperately long compile times
Reply #11 - May 17th, 2024 at 3:42pm
Print Post  
Hi, I have tested one build system against the other on a large project with lots of libraries and classes targeting an ESP32.

Firstly, the new build threw a couple of errors as I had old libraries in my libraries folder that were being picked up rather than the core libraries, in my case a LittleFS and WiFi library. Deleting these from the libraries folder fixed the problem.

Timing results as follow, all in seconds from the build output:
Old build system
Full rebuild  368
Rebuild with no changes  13
With change to .ino  92
With change to class (cpp) file 16.5

New build system
Full rebuild  217
Rebuild with no changes  78
With change to .ino  85
With change to class (cpp) file  80

In the above the board.txt has nothing related to build in it.

Reverting back to the board.txt that has configurations set for the build (by Tim) and using the old build system:
Full rebuild   216
Rebuild with no changes  85
With change to .ino  95
With change to class (cpp) file  10


I guess when caching is implemented the results will improve significantly.

Hope this is of use.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint