From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [RFC] compact buffers when idle Date: Thu, 19 Jul 2012 04:16:52 -0400 Message-ID: References: <5006DA74.1020100@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342685829 12737 80.91.229.3 (19 Jul 2012 08:17:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 08:17:09 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 19 10:17:07 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Srlv0-0007LR-8e for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2012 10:17:06 +0200 Original-Received: from localhost ([::1]:36378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srluz-00022E-ID for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2012 04:17:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srlur-0001wx-Fj for emacs-devel@gnu.org; Thu, 19 Jul 2012 04:17:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Srluo-0000Gp-Fa for emacs-devel@gnu.org; Thu, 19 Jul 2012 04:16:57 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:53968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srluo-0000Gk-Bv for emacs-devel@gnu.org; Thu, 19 Jul 2012 04:16:54 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6J8GqJa009158; Thu, 19 Jul 2012 04:16:53 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3341EAE20D; Thu, 19 Jul 2012 04:16:52 -0400 (EDT) In-Reply-To: <5006DA74.1020100@yandex.ru> (Dmitry Antipov's message of "Wed, 18 Jul 2012 19:47:00 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <787095> : uri <1169145> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:151751 Archived-At: > Core idea of this stuff is to run compact_buffer when idle, e.g. with: I guess you'd get most of the benefit from just adding the `compact' field and checking it before compacting any buffer. Could you provide such a patch (and please try to avoid including a large reindent just so as to move the nextb declaration)? Moving the code into a separate `compact_buffer' function is OK, tho, because it does make the code more readable (the Fgarbage_collect function is obviously too large). Stefan