From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Memory again Date: Wed, 07 Dec 2011 12:15:35 +0400 Message-ID: <4EDF20A7.6090701@yandex.ru> References: <4ED0F945.5090805@yandex.ru> <83pqge7syw.fsf@gnu.org> <87mxb6tkji.fsf@wanadoo.es> <4EDDED4B.7030607@yandex.ru> <8362htbos6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1323245748 29078 80.91.229.12 (7 Dec 2011 08:15:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2011 08:15:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 07 09:15:43 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 1RYCfG-0000SH-PZ for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2011 09:15:42 +0100 Original-Received: from localhost ([::1]:58636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYCfD-0007Ur-FL for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2011 03:15:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYCfA-0007UW-9P for emacs-devel@gnu.org; Wed, 07 Dec 2011 03:15:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYCf9-0000Lw-0P for emacs-devel@gnu.org; Wed, 07 Dec 2011 03:15:36 -0500 Original-Received: from mail.dev.rtsoft.ru ([213.79.90.226]:44558) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RYCf8-0000KT-Iy for emacs-devel@gnu.org; Wed, 07 Dec 2011 03:15:34 -0500 Original-Received: (qmail 19904 invoked from network); 7 Dec 2011 08:15:31 -0000 Original-Received: from unknown (HELO ?192.168.5.146?) (192.168.1.70) by 0 with SMTP; 7 Dec 2011 08:15:31 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 213.79.90.226 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:146534 Archived-At: 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. Dmitry