Compiling duration

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

User avatar
Prof. Dr. YoMan
Posts: 57
Joined: Thu May 24, 2012 11:00 am
Been thanked: 1 time

Re: Compiling duration

Postby Prof. Dr. YoMan » Thu Feb 14, 2013 2:34 pm

I don't know.

Without -r make is "sitting" for 20sec doing "nothing".

After experiencing this problem i did some googling and found that the mingw make got this problem with -r.

In Qt-Creator (MinGW 32-bit Version) I don't have the problem.

MinGW for Qt is a different one (bundled) than the one for ARM development (deployed directly with MinGW-Get locally).

vibrolax
Posts: 9
Joined: Sat Jan 05, 2013 3:23 pm

Re: Compiling duration

Postby vibrolax » Thu Feb 14, 2013 7:36 pm

Google search with keywords "mingw make implicit rules slow" shows that the poor performance of mingw/msys make without -r is widely experienced. It has been reported since at least 2008. Probably because it works well enough by disabling the implicit rules, no one has yet seen fit to fix whatever the fundamental problem is.

Jon

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Re: Compiling duration

Postby goeck » Thu Feb 14, 2013 9:12 pm

Oh Jon, then I may use the mingw-make, that my compuiter used to search for before I changed PATH entry order.
Using the yagarto tools make I have the following benchmark ^^ results when using the STM32F0-DISCOVERY demo "benchmark":
make -j4 : 4,7s
make -j4 -r : 3,7s

I have to try it with the mingw-make tomorrow at work. Will post results.
What the heck, How am I supposed to make my way hand over hand until I reach the "-r" flag..... Anyway, thanks again for all the contribution.

Keep it up.
Cheers
Stefan

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Re: Compiling duration

Postby goeck » Fri Feb 15, 2013 1:17 pm

Ok, now I have my working horse at work compiling the slightly modified STM32F0-DISCOVERY code.
make -j4 : 46,8 s (MSYS-make -> mingw32-make)
make -j4 -r : 1,2 s

Thanks again for the hint to that flag and this way to this nasty bug in mingw32-make.exe.
Now, I in ChibiStudio/Eclipse I could do one of those options:
1. In ProjectPreferences -> C/C++ Build : Tab Behaviour : Build add the -r flag, so it says "all -r"
2. In ProjectPreferences -> C/C++ Build : Tab Behaviour : Build Settings uncheck "Use default build command" and append the -r flag here
It just comes to the same result.

Keep it up
Stefan

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Compiling duration

Postby Tectu » Fri Feb 15, 2013 2:35 pm

This sounds very odd. However, I guess the -r flag shouldn't be included in the Makefile since this is a bug of another software.


~ Tectu

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Re: Compiling duration

Postby goeck » Fri Feb 15, 2013 2:54 pm

yapp...agreed.

Freddie Chopin
Posts: 36
Joined: Wed Oct 17, 2012 8:57 am

Re: Compiling duration

Postby Freddie Chopin » Sat Feb 16, 2013 11:01 am

You're searching in the wrong direction. If you're using make from MSYS than there's no surprise it's slow - recently they decided that make on Windows should be case insensitive (or sth like that), so if you have rule for your_file.c then this make will check whether it did not actually match:
your_file.c, Your_file.c, yOur_file.c, yoUr_file.c, youR_file.c, ..., YouR_FILe.C, yOUR_fILe.c, ... (Windows is case insensitive) that's why it takes ages to actually start doing anything. This of course makes completely no sense for anything but really old apps written in the age of MS DOS, where everything was UPPERCASE

You just need to visit this link http://sourceforge.net/p/mingw/bugs/1476/ and replace your make.exe with the file linked at the third post, which is case-sensitive (or sth).

After installing some recent MSYS environment (and you can "get" if with MinGW or Qt) I also saw that for 30s nothing happens and after that long time make finally decides that there's really nothing to do. Changing the file fixed the issue.

There's even a better option - replace make with tup - that build system is really fast and powerful (;

There's also another matter for those of you who use linaro toolchain - I've described the issue and a "solution" here http://www.freddiechopin.info/en/articl ... -co-chodzi (btw there are also some indirect figures showing improvements of using tup instead of make).

EDIT: I've just checked an when using csmake (from the bugreport linked above) using "-r" makes absolutely no difference for the compilation time.

4\/3!!

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: Compiling duration

Postby pito » Sat Feb 16, 2013 11:58 am

FYI - Win XP SP3, ChibiStudio, 407Discovery Demo, 1.7GHz Celery notebook (ssd disk), after clean:
11:55:15 Build Finished (took 37s.406ms)
Incremental build (main.c changes):
12:03:38 Build Finished (took 6s.312ms)

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Compiling duration

Postby Tectu » Sat Feb 16, 2013 12:42 pm

Thank you very much for this informations, freddie. I'll keep them in mind!

At everyone who works with windows: Omfg, I could really not work like that. I mean I have never longer than 3 seconds compiling big projects including fatfs, lwip and gfx. And what I can see from your benchmark informations, it's definitely not a hardware issue (which we do know now).


~ Tectu

gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm
Location: Aberdeenshire, UK

Re: Compiling duration

Postby gmb42 » Sat Feb 16, 2013 1:01 pm

You always need a few seconds during the compile for a few sips of your favourite beverage. If its too quick I'd dehydrate :D


Return to “General Support”

Who is online

Users browsing this forum: Bing [Bot] and 18 guests