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 New Compile Times (Read 1875 times)
davidcoward
Junior Member
**
Offline


Posts: 48
Joined: Oct 5th, 2012
New Compile Times
Jun 7th, 2018 at 10:20pm
Print Post  
Hi

I've downloaded and installed the latest version on Visual Studio, and thought I would share some findings about compile times with the new shared core stuff.

The project is for Teensy 3.1/3.2. The aggregate project cpp file is 1400 lines. It uses these libraries:

#include <button.h>
#include <Metro.h>
#include <Audio.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include <Wire.h>

The computer is an i7, Win10.

The results are as follows:

Build as debug

Shared cache first build 81 secs (having built another similar architecture project beforehand)
Shared cache subsequent builds 22 secs

Private cache first build 73 secs
Private cache subsequent builds 2 secs

Build as Release

Shared cache first build 85 secs (having built another similar architecture project beforehand)
Shared cache subsequent builds 16secs

Private cache first build 76 secs
Private cache subsequent builds 1.5 secs

Just sharing....

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: New Compile Times
Reply #1 - Jun 7th, 2018 at 10:25pm
Print Post  
Thanks for this.

It suggests the shared core is expecting to use cache but subsequently runs through validating the datetime of each .o then it will build into a .a file.

The bottom line is that something is throwing the cache flags out and it's doing work it shouldn't need to do.

Questions

If you try a standard arduino board such as Uno what happens?

As with any compilation there are a few factors involved so switching on vmicro>compiler>verbose and also "show build properties". Then posting or emailing as a .txt file is useful. 

Thanks
  
Back to top
WWW  
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 48
Joined: Oct 5th, 2012
Re: New Compile Times
Reply #2 - Jun 7th, 2018 at 11:20pm
Print Post  
I guess it is an architecture thing.

Here's the results for a simple Blinky on an Uno, from clean:

Debug

Shared/1st 15
Shared subsequent 1.7

Private/1st 29
Private subsequent 1.7

Release

Shared/1st 15
Shared subsequent 1.6

Private/1st 17
Private subsequent 1.3

Then a subsequent shared/1st build is about 2 secs.

And I attach the results of verbose output for shared and non-shared for the more complex Teensy project used in my first test. This is just in release mode.

Again, just FYI really.
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: New Compile Times
Reply #3 - Jun 7th, 2018 at 11:38pm
Print Post  
Thanks a lot. I'll take a look over the next few days.

Not everyone will read the release notes like you have, so they won't know how to switch off shared cache.


Thanks again
  
Back to top
WWW  
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: New Compile Times
Reply #4 - Jun 8th, 2018 at 5:57am
Print Post  
I noticed that the compile was remarkably faster but did not realize that it was by design.

I take it the default settings will yield the fastest results or must I go fiddle?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: New Compile Times
Reply #5 - Jun 8th, 2018 at 2:11pm
Print Post  
Yes default is best although switching on "vmicro>compiler>parallel builds" can have an additional large time saving if many files are being recompiled.
« Last Edit: Jun 8th, 2018 at 2:12pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint