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 Improving build/rebuild speed (Read 1372 times)
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Improving build/rebuild speed
Jul 31st, 2022 at 8:46am
Print Post  
My ESP32 project has grown quite large and is now taking a long time to build.
I think I have all the caching enabled but even with that it is still taking over 2'40 minutes to rebuild, a clean build takes over 5 minutes.

I'm running on a pc with a Core i9 processor and SSD hard drive and plenty of memory.

I recorded times as follow:
From a clean build
Deep search: 3'49
Libraries: 1'13
Code: 0'18

Rebuild:
Deep search: 2'30
Libraries: 0'03
Code: 0'18

Any suggestions on how to improve this?
I've emailed output from a clean build and a rebuild.
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Improving build/rebuild speed
Reply #1 - Jul 31st, 2022 at 2:43pm
Print Post  
Please show what is in your board.txt
  
Back to top
WWW  
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: Improving build/rebuild speed
Reply #2 - Jul 31st, 2022 at 3:09pm
Print Post  
Here it is..

# Inverter32 build property overrides
#

network.password=j3ss1camINV32
network.auth_upload=yes
network.port=3232

# Force LittleFS Usage 
#runtime.tools.mkspiffs.path=notTheToolYoureLookingFor 
sp32\tools\mklittlefs\3.0.0-gnu12-dc7f933

tools.esptool_py.network_cmd.windows="{runtime.platform.path}/tools/espota.exe"

# Increment version before build
recipe.hooks.sketch.prebuild.1.pattern=cmd.exe /c {build.project_path}\version.bat {build.project_path}\fwversion.h

#Copy bin file to directory with version number
recipe.objcopy.hex.pattern.1.pattern=cmd.exe /c {build.project_path}\copyme.bat {build.project_path}\FWVersion.h {vm.last.buildpath}\{build.project_name}.bin s:\temp\ "{menu.fsupload.littlefs.runtime.tools.mklittlefs.path}\mklittlefs.exe" {build.project_path}\data
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Improving build/rebuild speed
Reply #3 - Jul 31st, 2022 at 3:21pm
Print Post  
The issue appears to be your version increment. It causes all the files that reference it to be rebuilt every time. All other files are cached correctly.

Code
Select All
# Increment version before build
recipe.hooks.sketch.prebuild.1.pattern=cmd.exe /c {build.project_path}\version.bat {build.project_path}\fwversion.h

#Copy bin file to directory with version number
recipe.objcopy.hex.pattern.1.pattern=cmd.exe /c {build.project_path}\copyme.bat {build.project_path}\FWVersion.h {vm.last.buildpath}\{build.project_name}.bin s:\temp\ "{menu.fsupload.littlefs.runtime.tools.mklittlefs.path}\mklittlefs.exe" {build.project_path}\data

 

  
Back to top
WWW  
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: Improving build/rebuild speed
Reply #4 - Jul 31st, 2022 at 4:00pm
Print Post  
Yes, that was it.

It was only used in one place but was in the header for the whole project.
Moving it to where it is actually used has reduced the compile time to around a minute.

Thanks - now I'll drink less coffee as I won't have time to make a cup while compiling!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint