>>>>> "Leif" == Leif Neland <leif@stripped> writes:
Leif> On Sat, 1 Jan 2000, Paul DuBois wrote:
>> At 4:23 PM +0100 2000-01-01, Leif Neland wrote:
>> >So far it has been taking 2 hours to compile sql_yacc.cc from mysql3.22.
>> >I had to find an old disk for swap, and it's swapping all the time.
>> >top shows 156M size and 46M res., run time 20min's for cc1plus.
>> >That probably means it's been waiting for swapping in 1h40m...
>> >The box is a 333MHz PII, with 64M ram. Do I just need more ram to be able
>> >to compile in reasonable time, or is something broken?
>> >I'm running FreeBSD current from 01/01/2000.
>> It's not unusual for sql_yacc.cc to take a long time to compile, although
>> two hours is pretty extreme. :-)
>> If it eventually dies with an error, try re-running configure with the
>> --with-low-memory option.
Leif> It took 3 hours or so, but finally succeeded.
The reason for this is that some gcc optimizations stages takes
exponentially more memory when compiling big functions.
bison produces one big function for the grammar parsing and its
this that takes a long time to compile; To compile sql_yacc.cc quickly
on Intel, you nead at least 160M of free ram. On a PentiumII 400mz with 256M
ram, it takes 11 seconds to compile sql_yacc.o. Having to use swap
can easily make things 1000 times slower