From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: BASE_PURESIZE Date: Sat, 24 Oct 2009 15:18:57 +0200 Message-ID: <83ljj1exq6.fsf@gnu.org> References: <8363a6gytm.fsf@gnu.org> <834opqgpzs.fsf@gnu.org> <83skd9f6ok.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1256391002 23980 80.91.229.12 (24 Oct 2009 13:30:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2009 13:30:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 24 15:29:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N1ggs-00050t-Rd for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2009 15:29:55 +0200 Original-Received: from localhost ([127.0.0.1]:51634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1ggs-0007xg-AH for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2009 09:29:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1gWO-0008Ep-C6 for emacs-devel@gnu.org; Sat, 24 Oct 2009 09:19:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1gWJ-0008At-LB for emacs-devel@gnu.org; Sat, 24 Oct 2009 09:19:03 -0400 Original-Received: from [199.232.76.173] (port=38921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1gWJ-0008Ag-F8 for emacs-devel@gnu.org; Sat, 24 Oct 2009 09:18:59 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:55508) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N1gWJ-0003TN-4Q for emacs-devel@gnu.org; Sat, 24 Oct 2009 09:18:59 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KS000F00SLM4500@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 24 Oct 2009 15:18:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.77.20]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KS00048DSZKBFS0@a-mtaout22.012.net.il>; Sat, 24 Oct 2009 15:18:58 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116366 Archived-At: > From: Andreas Schwab > Cc: emacs-devel@gnu.org > Date: Sat, 24 Oct 2009 12:37:19 +0200 > > Eli Zaretskii writes: > > > For the record, the extra use of purecopy caused the pure_bytes_used > > value to go up by 52KB on 32-bit Windows, and by 92KB on 64-bit > > GNU/Linux. So it looks like the ratio is actually closer to 9/5 than > > to either the old 10/6 or the new 11/7. Or maybe I'm missing > > something. > > It all depends on the ratio of string data vs. lisp object pure storage. I made some measurements. The ratio of 11/7 seems to work pretty well, but there are two additional problems: . The default value of SYSTEM_PURESIZE_EXTRA is zero, and is not increased for GUI builds. This causes a --without-x build to waste some 100KB. If we want to handle this, the basic constant in BASE_PURESIZE can be as low as 1290000 and SYSTEM_PURESIZE_EXTRA should have its default at 140000 for GUI builds, zero otherwise. . The amount of pure storage used by load-history depends on the length of the filename of the directory where Emacs is dumped. In my case, I have 32 characters before the "emacs/lisp/" part, so I'm guessing that's the main reason the value of 1430000 was too small for me. We could decide that we don't care too much about the --without-x case, but what about the second problem? If we want to handle it without wasting storage on systems with shorter file names, we would need some code in src/Makefile.in that would measure the length of the directory name and enlarge PURESIZE accordingly.