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 and Verbose
  • 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 Compilation speed is too slow (Read 441 times)
sstm..
Junior Member
**
Offline


Posts: 11
Joined: Jul 4th, 2021
Compilation speed is too slow
Nov 28th, 2022 at 11:55am
Print Post  
ICACHE *: 32768           - flash instruction cache
Program size: 380,013 bytes (used 40% of a 958,448 byte maximum) (85.79 secs)
IROM   *: 348468          - code in flash         (default or ICACHE_FLASH_ATTR)
Minimum Memory Usage: 35684 bytes (44% of a 81920 byte maximum)

I just wrote a few lines of code,but the compilation time is to long.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 1615
Joined: Feb 13th, 2019
Re: Compilation speed is too slow
Reply #1 - Nov 28th, 2022 at 12:05pm
Print Post  
Thanks for the report.

The compilation should be faster on the second build (assuming the board selection, board options and debugger settings haven't changed).

Can you attach the full build output with the settings shown at the top of the page for a clean build (use Build > Clean Solution), and then for the next build?
  
Back to top
 
IP Logged
 
sstm..
Junior Member
**
Offline


Posts: 11
Joined: Jul 4th, 2021
Re: Compilation speed is too slow
Reply #2 - Nov 28th, 2022 at 12:19pm
Print Post  
Sorry,I didn't find that option in Build button.It didn't provide any options.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 1615
Joined: Feb 13th, 2019
Re: Compilation speed is too slow
Reply #3 - Nov 28th, 2022 at 12:26pm
Print Post  
The Clean Solution menu option is available from the Visual Studio Menu "Build", with Clean Solution being available on that menu.

The options shown at the top of the page are on the vMicro > Compiler Menu.

The output we require is from the Output Window, which has a dropdown at the top for "Micro Build".
  
Back to top
 
IP Logged
 
sstm..
Junior Member
**
Offline


Posts: 11
Joined: Jul 4th, 2021
Re: Compilation speed is too slow
Reply #4 - Nov 28th, 2022 at 1:45pm
Print Post  
ICACHE *: 32768           - flash instruction cache
Program size: 535,873 bytes (used 56% of a 958,448 byte maximum) (81.25 secs)
IROM   *: 501244          - code in flash         (default or ICACHE_FLASH_ATTR)
Minimum Memory Usage: 37268 bytes (45% of a 81920 byte maximum)

It didn't work. Sad
By the way, my board is ESP8266/NodeMCU.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 1615
Joined: Feb 13th, 2019
Re: Compilation speed is too slow
Reply #5 - Nov 28th, 2022 at 3:53pm
Print Post  
The instructions were just to provide the information so we can investigate this issue more easily, and replicate your environment fully, they will not resolve the issue.

If you can enable the below settings:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties


And then perform a build, and save the full output to a text file (e.g. Build1.txt).

Make a small change to your code, and then perform another build and save the full output to a text file (e.g. Build2.txt).

Then ZIP and attach these files and we will be able to investigate the issue more easily.
  
Back to top
 
IP Logged
 
sstm..
Junior Member
**
Offline


Posts: 11
Joined: Jul 4th, 2021
Re: Compilation speed is too slow
Reply #6 - Nov 29th, 2022 at 1:58am
Print Post  
The build logs.
  

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


Posts: 1615
Joined: Feb 13th, 2019
Re: Compilation speed is too slow
Reply #7 - Nov 29th, 2022 at 10:20am
Print Post  
Thanks for the logs, all of the caching appears to be working correctly for Deep Search, and Core/Libraries/Variant, as the first build took 95.92 secs, with the rebuild only taking 30.32 secs.

If you aren't using the Serial Debugger, disabling this may help speed up the compilation further.  The simplest way to do this is to change to the Release Build Configuration from the toolbar (the first build will take longer, but subsequent builds should be faster than 30s).

Are you seeing the slow (80s+) builds when any other sketch code changes are made?  If you do can you also attach the build log from when this happens again for comparison?

FYI

Remeber that although you only write a few lines of code your code uses some large libraries + underlying esp core. 

The Blinker library is especially large. It is cached after first compile but it still requires a lot of file date times to be checked. Here are the files compiled as as a result of libraies. 

We can see below that the compilation of libraries has been cached. Therefore any slowness might be related to virus checker or disk/cpu speed.

Code (C++)
Select All
Using library Blinker version 0.3.9 in folder "file:///C:/Users/XH/Documents/Arduino/libraries/Blinker"
  Using previously compiled file: \Blinker\Blinker\BlinkerDebug.cpp.o
  Using previously compiled file: \Blinker\Blinker\BlinkerTimer.cpp.o
  Using previously compiled file: \Blinker\Blinker\BlinkerUtility.cpp.o
  Using previously compiled file: \Blinker\Functions\BlinkerUpdater.cpp.o
  Using previously compiled file: \Blinker\modules\AsyncTCP\AsyncTCP.cpp.o
  Using previously compiled file: \Blinker\modules\base64\Base64.cpp.o
  Using previously compiled file: \Blinker\modules\ESPAsyncTCP\tcp_axtls.c.o
  Using previously compiled file: \Blinker\modules\ESPAsyncTCP\AsyncPrinter.cpp.o
  Using previously compiled file: \Blinker\modules\ESPAsyncTCP\ESPAsyncTCP.cpp.o
  Using previously compiled file: \Blinker\modules\ESPAsyncTCP\ESPAsyncTCPbuffer.cpp.o
  Using previously compiled file: \Blinker\modules\ESPAsyncTCP\SyncClient.cpp.o
  Using previously compiled file: \Blinker\modules\mqtt\Adafruit_MQTT.cpp.o
  Using previously compiled file: \Blinker\modules\mqtt\Adafruit_MQTT_Client.cpp.o
  Using previously compiled file: \Blinker\modules\painlessMesh\painlessMeshConnection.cpp.o
  Using previously compiled file: \Blinker\modules\painlessMesh\painlessMeshSTA.cpp.o
  Using previously compiled file: \Blinker\modules\painlessMesh\scheduler.cpp.o
  Using previously compiled file: \Blinker\modules\painlessMesh\wifi.cpp.o
  Using previously compiled file: \Blinker\modules\WebSockets\SocketIOclient.cpp.o
  Using previously compiled file: \Blinker\modules\WebSockets\WebSockets.cpp.o
  Using previously compiled file: \Blinker\modules\WebSockets\WebSocketsClient.cpp.o
  Using previously compiled file: \Blinker\modules\WebSockets\WebSocketsServer.cpp.o
  Using previously compiled file: \Blinker\modules\WebSockets\libb64\cdecode.c.o
  Using previously compiled file: \Blinker\modules\WebSockets\libb64\cencode.c.o
  Using previously compiled file: \Blinker\modules\WebSockets\libsha1\libsha1.c.o

Using library ESP8266WiFi version 1.0 in folder .0.1/libraries/ESP8266WiFi"
  Using previously compiled file: \ESP8266WiFi\BearSSLHelpers.cpp.o
  Using previously compiled file: \ESP8266WiFi\CertStoreBearSSL.cpp.o
  Using previously compiled file: \ESP8266WiFi\enable_wifi_at_boot_time.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFi.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiAP.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiGeneric.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiGratuitous.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiMulti.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiScan.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiSTA-WPS.cpp.o
  Using previously compiled file: \ESP8266WiFi\ESP8266WiFiSTA.cpp.o
  Using previously compiled file: \ESP8266WiFi\WiFiClient.cpp.o
  Using previously compiled file: \ESP8266WiFi\WiFiClientSecureBearSSL.cpp.o
  Using previously compiled file: \ESP8266WiFi\WiFiServer.cpp.o
  Using previously compiled file: \ESP8266WiFi\WiFiServerSecureBearSSL.cpp.o
  Using previously compiled file: \ESP8266WiFi\WiFiUdp.cpp.o

  Using previously compiled library archive: \ESP8266WiFi\ESP8266WiFi.a

Using library ESP8266mDNS version 1.2 in folder .0.1/libraries/ESP8266mDNS"
  Using previously compiled file: \ESP8266mDNS\ESP8266mDNS.cpp.o
  Using previously compiled file: \ESP8266mDNS\LEAmDNS.cpp.o
  Using previously compiled file: \ESP8266mDNS\LEAmDNS_Control.cpp.o
  Using previously compiled file: \ESP8266mDNS\LEAmDNS_Helpers.cpp.o
  Using previously compiled file: \ESP8266mDNS\LEAmDNS_Structs.cpp.o
  Using previously compiled file: \ESP8266mDNS\LEAmDNS_Transfer.cpp.o

  Using previously compiled library archive: \ESP8266mDNS\ESP8266mDNS.a

Using library ESP8266HTTPClient version 1.2 in folder .0.1/libraries/ESP8266HTTPClient"
  Using previously compiled file: \ESP8266HTTPClient\ESP8266HTTPClient.cpp.o

  Using previously compiled library archive: \ESP8266HTTPClient\ESP8266HTTPClient.a

Using library EEPROM version 1.0 in folder .0.1/libraries/EEPROM"
  Using previously compiled file: \EEPROM\EEPROM.cpp.o

Using library Ticker version 1.0 in folder .0.1/libraries/Ticker"
  Using previously compiled file: \Ticker\Ticker.cpp.o

  Using previously compiled library archive: \Ticker\Ticker.a

Using library ESP8266httpUpdate version 1.3 in folder .0.1/libraries/ESP8266httpUpdate"
  Using previously compiled file: \ESP8266httpUpdate\ESP8266httpUpdate.cpp.o

  Using previously compiled library archive: \ESP8266httpUpdate\ESP8266httpUpdate.a

Using library Wire version 1.0 in folder .0.1/libraries/Wire"
  Using previously compiled file: \Wire\Wire.cpp.o

Using library Hash version 1.0 in folder .0.1/libraries/Hash"
  Using previously compiled file: \Hash\Hash.cpp.o
  

« Last Edit: Nov 29th, 2022 at 9:46pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint