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) Why 'compiling libraries' each time? (Read 6495 times)
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Why 'compiling libraries' each time?
May 26th, 2018 at 11:54pm
Print Post  
Hi,

I have 'Deep Search Libraries' turned OFF, and this does help the compile time somewhat, but I still see 'compiling libraries' each time.  Is there any way to skip library compiles when nothing in the libraries has changed?

VM Version 1.1803.26

TIA,

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #1 - May 27th, 2018 at 12:49am
Print Post  
Which version shows in tools>extensions and updates>install>arduino ide for vs?

What are you clicking to build?
« Last Edit: May 27th, 2018 at 1:41pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #2 - May 27th, 2018 at 1:38pm
Print Post  
Tim@Visual Micro wrote on May 27th, 2018 at 12:49am:
Which version shows in tools>extensions and updates>install>arduino ide for vs?

What are you clicking to build?



F7 (Build) or F5 (Start Debugging), both in Debug configuration.  I almost always run in Debug configuration to enable Serial, so I can get telemetry from my robot
« Last Edit: May 27th, 2018 at 1:41pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #3 - May 27th, 2018 at 1:47pm
Print Post  
please switch on verbose then post the compiler output as a .txt file or email to info[at]visualmicro.com after pressing F7
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #4 - May 27th, 2018 at 11:36pm
Print Post  
Tim@Visual Micro wrote on May 27th, 2018 at 1:47pm:
please switch on verbose then post the compiler output as a .txt file or email to info[at]visualmicro.com after pressing F7


Thanks.  Wouldn't fit into the 8000 character maximum, so I emailed it as you suggested.

TIA,

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #5 - May 27th, 2018 at 11:43pm
Print Post  
Thanks ,the best thing is to copy into a .txt file then post or email it but I have it now thanks.

Try to close atmel studio and delete the Arduino_IMU_TurnMgr.cppproj file from your Arduino_IMU_TurnMgr folder.

Also delete the _vm folder from the Arduino_IMU_TurnMgr folder

Then open atmel studio and use "file>open>arduino project" to reopen your Arduino_IMU_TurnMgr.ino

Does that work?
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #6 - May 29th, 2018 at 3:06am
Print Post  
Tim@Visual Micro wrote on May 27th, 2018 at 11:43pm:
Thanks ,the best thing is to copy into a .txt file then post or email it but I have it now thanks.

Try to close atmel studio and delete the Arduino_IMU_TurnMgr.cppproj file from your Arduino_IMU_TurnMgr folder.

Also delete the _vm folder from the Arduino_IMU_TurnMgr folder

Then open atmel studio and use "file>open>arduino project" to reopen your Arduino_IMU_TurnMgr.ino

Does that work?


Tim,

Do you mean 'VS2017' instead of 'atmel studio'?  I've never used (or even heard of) atmel studio.

I see no .cppproj files at all in the project folder.  I see a couple of *.vcxproj files, but no *.cppproj ones

Frank


  

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #7 - May 29th, 2018 at 10:14am
Print Post  
The project file for Visual Studio apps has .vcxproj extension.

You can also remove the .sln

Thanks
« Last Edit: May 29th, 2018 at 10:14am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #8 - May 29th, 2018 at 1:50pm
Print Post  
Tim,

So you are basically telling me to remove *all* the VS2017 specific files - *.vcproj* and *.sln, leaving only the *.ino file?

If I remove the *.vcproj & *.sln files, I can't compile the project at all; none of the 'Build' options are available.  I admit that this does solve the problem of 'compiling libraries' showing up during each build, but I can't say I'm very much in favor of this solution Wink.

Maybe I'm missing something here?

Frank
  
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #9 - May 29th, 2018 at 2:26pm
Print Post  
OK, so I removed the *.sln & *.vcproj* files and selected 'File->New->Arduino Project' in VS2017, and used my *.ino file as the basis for the new project.  However, builds still show 'Compiling Libraries...' each and every time.

I have attached a text file containing the verbose log

Frank
  

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #10 - May 29th, 2018 at 11:28pm
Print Post  
Thanks for the output. Does the vmicro>build menu command also compile libs each time?

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


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #11 - May 30th, 2018 at 2:18am
Print Post  
Tim@Visual Micro wrote on May 29th, 2018 at 11:28pm:
Thanks for the output. Does the vmicro>build menu command also compile libs each time?



Yep

Frank

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #12 - May 30th, 2018 at 12:37pm
Print Post  
What is" tools>options>visual micro>compiler optimization" set to?

Both default to True, are they both set to True?

Thanks
« Last Edit: May 30th, 2018 at 12:38pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #13 - May 30th, 2018 at 4:23pm
Print Post  
Tim@Visual Micro wrote on May 30th, 2018 at 12:37pm:
What is" tools>options>visual micro>compiler optimization" set to?

Both default to True, are they both set to True?

Thanks


No.  'Library Modified' was set to FALSE, although I have no idea how/why.

I set it back to TRUE and recompiled several times; the first time took about 16 sec, and the next three all took about 10 sec.  These times are significantly longer than with this option set to FALSE (10/7 resp).

Set it back to FALSE.  The first compile took WAY longer (27 sec, with most of that time spent in the 'Linking' section.   Next compile was 24 sec, then 23 sec, then 22 sec - RATS!!

Set it back to TRUE.  Now almost all the time (9.2 sec on the first compile) was spent on 'Linking'.  2nd compile was 9.7 sec, almost all spent either on 'Compiling Libraries' or 'Linking'.  The actual code compile is insignificant (less than 1 sec)

Set it back to FALSE just for completeness.  First compile about 24 sec, 2nd one 22, 3rd one 23 sec.  

Back to TRUE: 1st = 9.8, 2nd 9.9, 3rd 9.9 sec

I did notice that with the option set to TRUE, the time to compile the code was reduced to almost nothing.  In fact I have to watch closely to see the 'compiling code' string display between 'Compiling Libraries' and 'Linking'.  This is a change from before, where the code section compile took a second or so, and the library/linking sections took significantly less, for a total of around 7.8 sec on average.

So, it appears that messing with the 'Library Modified' option had the net effect of costing me about 2 sec/compile, without any positive effect  Embarrassed

I left it set for TRUE, as now the previous FALSE option is WAY too expensive in terms of time.

Frank

PS:  When I opened VS2017 this morning, I got a notification about a new version of Visual Micro, so I checked the release notes for 1804 - 1806 (I'm using 1803).  

1805.14: Support local project source code override
1805.25: When Deep Search for Libraries is enabled

Would either of these affect my issue?

Frank

  
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: Why 'compiling libraries' each time?
Reply #14 - May 30th, 2018 at 4:39pm
Print Post  
Downloaded & installed 1806.  Compiled same project without changing any settings.

First compile 42 sec!! 2nd was 9.9 sec, 2nd 9.9 sec.  Now the actual code compile section is too fast to see, so all this time is spent in 'Compiling Libraries' or 'Linking'.

Set both the new 'override' options to TRUE.  1st compile 10 sec. 2nd 10 sec.  Both 'Compiling Libraries' and 'Linking' sections take considerable time, and the 'Compiling Code' is too fast to see.

Set the back to the default 'FALSE' setting. 1st compile 10 sec, 2nd 9.9 sec



As a side note, I got a warning from VS2017 "Extension Arduino IDE for Visual Studio 1806.1.0 likely caused 6 sec of unresponsiveness....".  Any idea what that's all about?

TIA,

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why 'compiling libraries' each time?
Reply #15 - May 30th, 2018 at 7:07pm
Print Post  
First build of core after the cache has been cleared normally takes between 5 and 20 secs. depending on the core. Some users report different virus checkers affect build times. The build of each file is managed by the [toolchain].exe depending on your hardware.

After applying a visual micro upgrade the cores can be rebuilt instead of using the cached version. You will read in the what's new about a huge build improvement that shares compiled cores among similar projects. This means that 40 seconds is reduced to zero for all similar projects except the first project you compile. The compile has not changed in any way it is just the cache that has improved. So you build time testing should be ignored and you should not take any action based on the reasoning you applied.

The default setting for both Compiler Optimization settings should be True and should only be changed by advanced users.

You should not need to change any Visual Micro settings to have it work the way you want it to work and you have changed some settings. Therefore I want to suggest the following to resolve this issue.

1) email your .vcxproj to me at info[at]visualmicro.com or attach it here. I want to ensure you have not added any code shortcuts to library sources into your project.

2) I suggest you close visual studio and run regedit.exe. Then find the key called HKEY_CURRENT_USER\Software\Visual Micro. If you are confident you can see this key then delete it but do not delete anything else. This will clear your visual micro settings so when the IDE restarts it will prompt for the Arduino IDE location.

Thanks
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint