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) Speed: Build is compiling all (okay most) files each time (Read 2818 times)
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Speed: Build is compiling all (okay most) files each time
Jan 19th, 2024 at 8:46pm
Print Post  
Running a complex ESP32 app with >35 classes, >15 libraries, some core functions related to tasks and queues. 

Full build times was over 11 minutes. Deep Search was 7 minutes of this (with AV turned off). Turned off Deep Search and moved includes one by one into the .ino file until a compile succeeded. Build time is now 4-5 minutes.

However subsequent builds with no changes whatsoever, a extra line or 2 added, minor changes results in all local source files and 3 libraries being compiler again.... each time over and over. Now this brings the compile time to just under 4 minutes.

Still the cached / determination of which files to compile is not close to fully working.

Email being sent with build output

Where do I go from here?

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


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Speed: Build is compiling all (okay most) files each time
Reply #1 - Jan 20th, 2024 at 4:31pm
Print Post  
Thanks for the output. A minor point is that we are working on a better deep search system. Currently it replicates the arduino ide but it is very slow. Keep a watch on the release notes over the next month.

We can see that it is caching many libraries correctly but that a few libraries are not caching correctly.

We can also see a number of files listed as being included in the project but can no longer be found.  Correctly so.

The missing files are related to libraries. I suggest you clean up the project before we look at other possibilities. The missing files will appear in the solution explorer with a red exclamation mark ! The "show all files" icon above the solution explorer might be useful to see the physical files of a project.

The project should not contain any files relating to libraries.


This is from your output

Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h
Ignoring source code that is included in the project but can not be located: ies\HTTPClient\src\HTTPClient.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\Relay.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\SwitchWiF.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\TemperatureBase.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h
Ignoring source code that is included in the project but can not be located: ies\HTTPClient\src\HTTPClient.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\Relay.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\SwitchWiF.h
Ignoring source code that is included in the project but can not be located: C:\Users\NAME\Documents\Arduino\ZonedHVAC\TemperatureBase.h

If the problem persists, please email the .sln and .vcxproj files in a zip.


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


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Speed: Build is compiling all (okay most) files each time
Reply #2 - Jan 20th, 2024 at 5:35pm
Print Post  
Admin has created a new thread with this question as it is potentially slightly different.

This is a standard forum message.
Off-Topic replies have been moved to this Topic.
« Last Edit: Jan 20th, 2024 at 5:38pm by Tim@Visual Micro »  
Back to top
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Speed: Build is compiling all (okay most) files each time
Reply #3 - Jan 22nd, 2024 at 1:47pm
Print Post  
I removed the bad entries in the project, then cleaned the entire solution and rebuilt keeping Deep Search disabled. Build time was 4-5 minutes. Made a 1line change to a single file and rebuilt. Time was 3.5 minutes and it looked like it rebuilt more library files than the last time, plus all the source files.

I just emailed up a zip with the solution and project files and a new build output.

Im willing to work with any debug version to help track this down.

John
  
Back to top
 
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Speed: Build is compiling all (okay most) files each time
Reply #4 - Jan 24th, 2024 at 2:09pm
Print Post  
Solution/Project files re-uploaded.

Project is 'Debug'

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


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Speed: Build is compiling all (okay most) files each time
Reply #5 - Jan 24th, 2024 at 6:36pm
Print Post  
There isn't a reupload command

What do you click to get the output you posted?
  
Back to top
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Speed: Build is compiling all (okay most) files each time
Reply #6 - Jan 24th, 2024 at 8:32pm
Print Post  
Sorry I was confusing.

the 'VM BuildInfo 1.txt' in the zip is a copy of the Output window after I clicked the Build icon off the VMicro toolbar.

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


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Speed: Build is compiling all (okay most) files each time
Reply #7 - Jan 26th, 2024 at 5:03pm
Print Post  
Thanks, can you confirm this is happening is you create a new project and add one simple library?

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


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Speed: Build is compiling all (okay most) files each time
Reply #8 - Jan 30th, 2024 at 8:37pm
Print Post  
Sorry for the delay with this. 

It looks like you have switched off deep search for libraries. Please switch it back on or email your .ino code so that we can see how you have #included libraries.

nb: We are working on a faster deep search system that should give correct result but still work the same as the arduino ide.
  
Back to top
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Speed: Build is compiling all (okay most) files each time
Reply #9 - Feb 11th, 2024 at 4:46pm
Print Post  
I finally was able to find some time to look at this.

Yes deep search was turned off as it was over 6 minutes. I updated the ino with includes to get a successful build. However as i said, it was still 4 minutes each time.

tried with a few small projects and it worked as I think it should, so I started poking around with my projects (again lots of *.cpp files).I commented out bits in the initial ino, but still no luck. I then noticed that i had a ifdef section of includes for a AVR build that was there from before i converted over to esp32. So they were not required. Commenting out that set of includes and it worked as expected. Libraries and project code were not re-compiled, unless they were changed.

Does this make sense?

When turning on Deep Search, the results are better than before, however still long at 6 mins. Deep search is skipping over libraries which is good, however others are still being rescanned. Re-compile of libraries is being skipped, but project files are being re-compiled even if no changes are made.   

Having all or most includes in the ino is sloppy, but it means that Deep Search can be turned off and compiles of <20 seconds for project files changes is worth it. 

Definitely interested in testing out the new version with improved Deep Search... keep me posted

John
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2866
Joined: Feb 13th, 2019
Re: Speed: Build is compiling all (okay most) files each time
Reply #10 - May 17th, 2024 at 10:09am
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