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: [Emacs-diffs] /srv/bzr/emacs/trunk r109157: Compact buffers when idle. Date: Thu, 19 Jul 2012 18:34:49 +0400 Message-ID: <50081B09.5060406@yandex.ru> References: <5007EE20.8010005@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342708362 9608 80.91.229.3 (19 Jul 2012 14:32:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 14:32:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 19 16:32:42 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 1SrrmQ-0007bX-Ha for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2012 16:32:38 +0200 Original-Received: from localhost ([::1]:35537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrrmP-0001RS-TR for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2012 10:32:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrrmK-0001R5-HF for emacs-devel@gnu.org; Thu, 19 Jul 2012 10:32:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrrmG-0007kH-H2 for emacs-devel@gnu.org; Thu, 19 Jul 2012 10:32:32 -0400 Original-Received: from forward5h.mail.yandex.net ([84.201.186.23]:52842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrrmG-0007jy-8h for emacs-devel@gnu.org; Thu, 19 Jul 2012 10:32:28 -0400 Original-Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward5h.mail.yandex.net (Yandex) with ESMTP id 6AFC7D01F79; Thu, 19 Jul 2012 18:32:26 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342708346; bh=3CRhn5J6HY7SCtw2bPQA87yw73w74kUDxAF2YWBvCCw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=dzx+67dg8+c/eQqNNpT3BfSr8M06bxgqbgI8Ccaz3mjIzvEmH4ZTHnZqVvt3C1L+Z IvdXBp4jiIIJPA4ngKzShLxaslE1EYq/sV9S22OCxsdAOndPwuiBK/uTs9Ha8CAzM5 JQH65Fznrg3I0FTGQ47OUdPXuLxMGiH1DZmSRzAs= Original-Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 3612F2C0268; Thu, 19 Jul 2012 18:32:26 +0400 (MSK) Original-Received: from 186.gprs.mts.ru (186.gprs.mts.ru [213.87.129.186]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id WO58Q5Tb-WP5KkbAV; Thu, 19 Jul 2012 18:32:25 +0400 X-Yandex-Rcpt-Suid: monnier@IRO.UMontreal.CA X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342708346; bh=3CRhn5J6HY7SCtw2bPQA87yw73w74kUDxAF2YWBvCCw=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=XggmCXCLgp0SCArzvLv3ew84Ye79XozRXj1W1f5Vz8J60Amz3U8xqPLgwhEQqOpYH Q0KoLS5srhOOPWv+QZ2ihkbL7Bmm1lPS1VP9FuoJoRhvFKVi1yG0+k5w4qludUqtLJ NWDM0QO85u/COgAXitgNIxbCPet/BdfJeLfgqkGY= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 84.201.186.23 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:151760 Archived-At: On 07/19/2012 03:54 PM, Stefan Monnier wrote: > I can't think of any case where that would provide any noticeable > benefit (whereas I can think of cases where it just wastes resources). Hm... I expect this to be something exotic, like replace-string across hundreds of buffers. On the other side, it's quite typical code refactoring operation. When I need to change function name across the project, I'm using perl just because Emacs is too slow :-(. > The GC is run fairly regularly, also typically while idle, and does the > compaction. 1. Typically it happens when we're executing byte code, or from eval.c, when we want to be as fast as possible. 2. I don't understand why idle call to Fgarbage_collect is glued with auto-save-timeout. If I don't want to use auto-save, why I shouldn't call GC when idle? > So until you can provide some concrete and convincing numbers that show > some benefit, I'd ask you to remove that pat of your patch. Hm... I suppose that 3GHz CPUs makes a lot of small optimizations almost invisible; but I believe it doesn't mean that they're not needed anymore. For example, I'm pretty sure that removing Blength bytecode (and so calling Flength via Funcall) will not introduce any noticeable slowdown for any real use case (although we can design special benchmark which will do myriads of (length xxx) and nothing more). Dmitry