From owner-freebsd-current Mon Jan 3 18:24: 4 2000 Delivered-To: freebsd-current@freebsd.org Received: from www.sashanet.com (www.sashanet.com [209.181.82.105]) by hub.freebsd.org (Postfix) with ESMTP id 66E8B152EB for ; Mon, 3 Jan 2000 18:23:58 -0800 (PST) (envelope-from sasha@mysql.com) Received: from mysql.com (apachev@localhost [127.0.0.1]) by www.sashanet.com (8.9.3/8.9.3) with ESMTP id TAA28532; Mon, 3 Jan 2000 19:23:40 -0700 Message-ID: <387159A8.C46C69E1@mysql.com> Date: Mon, 03 Jan 2000 19:23:36 -0700 From: Sasha Pachev Organization: MySQL X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.33 i586) X-Accept-Language: ru MIME-Version: 1.0 To: Leif Neland Cc: monty@tcx.se, Paul DuBois , mysql@lists.mysql.com, freebsd-current@freebsd.org Subject: Re: 2 hours to compile mysql? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Leif Neland wrote: > > > 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 > > > > Is amount of ram available (portably) to configure? > So configure could decide to use --low-memory by itself? Allowing > overrides, naturally. > > Leif > There is actually a method to portably guess how much RAM your have available from configure -- just write a small C program that will keep malloc()-ing until it gets an error, but I do not think it is worth the effort. -- Sasha Pachev +------------------------------------------------------------------+ | TcX ____ __ _____ _____ ___ == mysql@tcx.se | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sasha@mysql.com | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +------------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message