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: Memory again Date: Wed, 07 Dec 2011 08:06:43 -0500 Message-ID: References: <4ED0F945.5090805@yandex.ru> <83pqge7syw.fsf@gnu.org> <87mxb6tkji.fsf@wanadoo.es> <4EDDED4B.7030607@yandex.ru> <8362htbos6.fsf@gnu.org> <4EDF20A7.6090701@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1323263213 21512 80.91.229.12 (7 Dec 2011 13:06:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2011 13:06:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 07 14:06:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RYHCy-0007kt-KU for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2011 14:06:48 +0100 Original-Received: from localhost ([::1]:42318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYHCy-0000WC-4h for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2011 08:06:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYHCv-0000SS-7I for emacs-devel@gnu.org; Wed, 07 Dec 2011 08:06:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYHCu-0000mb-0M for emacs-devel@gnu.org; Wed, 07 Dec 2011 08:06:45 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:32792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYHCt-0000mX-V0 for emacs-devel@gnu.org; Wed, 07 Dec 2011 08:06:43 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RYHCt-0000MT-Sd; Wed, 07 Dec 2011 08:06:43 -0500 In-reply-to: <4EDF20A7.6090701@yandex.ru> (message from Dmitry Antipov on Wed, 07 Dec 2011 12:15:35 +0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146543 Archived-At: > Date: Wed, 07 Dec 2011 12:15:35 +0400 > From: Dmitry Antipov > > On 12/07/2011 11:52 AM, Eli Zaretskii wrote: > > > You are, in fact, saying that fontifying a 60-MByte compilation buffer > > creates text properties and other supporting data structures that can > > accrue to a total of 2G bytes. I find this extremely hard to believe. > > A simple calculation will show that a file that has 1 million lines > > with 5 different faces (warning, line number, column number, > > underline, default) per line needs only a few million intervals -- how > > can this require 2G bytes of memory? > > Start fresh Emacs instance, make sure you're in *scratch*. Type M-x > compilation-minor-mode, then eval (staying in *scratch*, of course): > > (let ((x 0)) (while (< x 1000000) (insert "test:1:oops\n") (setq x (1+ x)))) > > Wait for completion, then see RSS. Next, kill *scratch*, M-x garbage-collect > and see RSS again. How is this different from compiling a C file with 1000000 #warning directives? What am I missing?