improving compile time - General Discussion and Assistance - CHDK Forum

improving compile time

  • 8 Replies
  • 2557 Views
improving compile time
« on: 10 / November / 2020, 13:54:45 »
Advertisements
OK, I admit I am brand new at modifying and recompiling the CHDK for my G11, but I have 20+ years in software development using the Microsoft development stack.

Everytime I recompile the CHDK from the compiler GUI (0.9.323), it takes forever (10 min or more...) to complete  :'(

Can someone please give me some pointers on improving the performance of the compiler, even if it is by using the console and running gmake manually, to use the files already compiled in a previous run, and not recompile everything everytime?

Thanks,
Riaan

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: improving compile time
« Reply #1 on: 10 / November / 2020, 14:45:29 »
 ;) Maybe You have the 'Full' option set, usually 'Clean' is enough.
« Last Edit: 10 / November / 2020, 15:21:19 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14080
Re: improving compile time
« Reply #2 on: 10 / November / 2020, 16:05:24 »
OK, I admit I am brand new at modifying and recompiling the CHDK for my G11, but I have 20+ years in software development using the Microsoft development stack.

Everytime I recompile the CHDK from the compiler GUI (0.9.323), it takes forever (10 min or more...) to complete  :'(
10 minutes seems quite long, what kind of system is this on?

On an ancient sandy bridge I5 running win 10, "make clean fir" for d10 with stubs took me 1 minute 20 seconds.

FWIW, I've found windows defender sometimes *drastically* slows compilation on Windows. The above time is with it fully enabled.

I've found that batch builds running in a linux virtualbox VM are actually faster than the equivalent running directly on the windows host.

Quote
Can someone please give me some pointers on improving the performance of the compiler, even if it is by using the console and running gmake manually, to use the files already compiled in a previous run, and not recompile everything everytime?
You can use "make fir" to do an incremental build. However, you should be aware that dependencies aren't airtight, so it's possible to get an incorrect build.
Don't forget what the H stands for.

Re: improving compile time
« Reply #3 on: 11 / November / 2020, 00:45:33 »
;) Maybe You have the 'Full' option set, usually 'Clean' is enough.

Yes, I had both clean and full selected. When I just picked clean I got an error on compiling.


10 minutes seems quite long, what kind of system is this on?
I am running on an Intel i7 - 7820HQ @ 2.90GHz, 16Gb RAM, SSD harddisk with Windows 10(64bit) installed - a pretty decent laptop really.

As a test, I have just
  • changed a line of code in gui_osd.c after my last build.
  • deleted the zip files from the previous build
  • selected the build options (Full, but not clean) - screenshot attached
  • clicked Compile button

Build started 06:20....07:20....still compiling away.... :o
07:39: "**** Firmware creation completed Succesfully"
07:41: cmd window closes

that is 1hour 21 minutes.... :o
this cannot be normal?


*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: improving compile time
« Reply #4 on: 11 / November / 2020, 04:21:16 »
@riaan.marx

- try unchecking "Debugging" -- it will generate enormous amounts of log entries
- try excluding your CHDK folder from realtime checking in Defender
- respecting above, I get compile times around 6 minutes on a very slow Atom laptop
hope that helps,
whim

*

Offline reyalp

  • ******
  • 14080
Re: improving compile time
« Reply #5 on: 11 / November / 2020, 13:16:25 »
Build started 06:20....07:20....still compiling away.... :o
07:39: "**** Firmware creation completed Succesfully"
07:41: cmd window closes

that is 1hour 21 minutes.... :o
this cannot be normal?
No, that's totally absurd, one camera should be like a minute on your system  :o

Just in case: You are clicking COMPILE, not COMPILE ALL, correct? ALL would be a batch build of every firmware, which could take that long.
Don't forget what the H stands for.

Re: improving compile time
« Reply #6 on: 12 / November / 2020, 01:33:03 »
@riaan.marx

- try unchecking "Debugging" -- it will generate enormous amounts of log entries
- try excluding your CHDK folder from realtime checking in Defender
- respecting above, I get compile times around 6 minutes on a very slow Atom laptop
hope that helps,
whim

Thank you whim! - tested unchecking debug, still took long.
I then transferred the files to my personal computer (the laptop I have been using is locked down as far as the AV/Defender settings are concerned).

On my personal computer it was about a minute to do the full compile.
Must be the AV/Defender.

Thank you!

Re: improving compile time
« Reply #7 on: 12 / November / 2020, 01:35:12 »
No, that's totally absurd, one camera should be like a minute on your system  :o

Just in case: You are clicking COMPILE, not COMPILE ALL, correct? ALL would be a batch build of every firmware, which could take that long.
Yes, thanks reyalp - to confirm, yes, I clicked the "compile" button. It seems it is the AV/Defender causing the horrible performance.
Thanks for the time and effort everyone!


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: improving compile time
« Reply #8 on: 12 / November / 2020, 12:01:12 »
- try unchecking "Debugging" -- it will generate enormous amounts of log entries
The 'Warnings' would generate some  :o  lines, 'Debugging' is for Debugscreen on camside.
It seems to be need to close/reopen Chdk-Gui after resetting switch...
Quote
... and to close zip-tool before recompiling.
rm: cannot remove `./bin/CHDK_DE-m100-100a-1.5.0-5616.zip': Permission denied
gmake: *** [firzipsub] Error 1
Btw: That´s the page behind "misc...":
« Last Edit: 12 / November / 2020, 14:40:16 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics