From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#122: 23.0.60; Slowdown in directory scanning over time. Date: Mon, 15 Sep 2008 10:04:25 +0900 Message-ID: References: <87r68bwgu9.fsf@cyd.mit.edu> Reply-To: Kenichi Handa , 122@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1221442073 15580 80.91.229.12 (15 Sep 2008 01:27:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2008 01:27:53 +0000 (UTC) Cc: 122@emacsbugs.donarmstrong.com, cyd@stupidchicken.com, lenbok@gmail.com, bug-gnu-emacs@gnu.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 03:28:49 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kf2tS-0004YT-MG for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Sep 2008 03:28:46 +0200 Original-Received: from localhost ([127.0.0.1]:42152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf2sR-0000RA-KM for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 21:27:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kf2sN-0000Oj-32 for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:27:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kf2sL-0000NS-NM for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:27:38 -0400 Original-Received: from [199.232.76.173] (port=59318 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf2sL-0000NO-EO for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:27:37 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39302) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kf2sK-0003xJ-VW for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:27:37 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8F1RYws001808; Sun, 14 Sep 2008 18:27:34 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8F1A4Xx027718; Sun, 14 Sep 2008 18:10:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 15 Sep 2008 01:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 122 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122144069125061 (code B ref -1); Mon, 15 Sep 2008 01:10:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 15 Sep 2008 01:04:51 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8F14m2I025055 for ; Sun, 14 Sep 2008 18:04:49 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kf2WG-0004YQ-0j for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:04:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kf2WE-0004XI-Ed for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:04:47 -0400 Original-Received: from [199.232.76.173] (port=55012 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf2WE-0004X8-AE for bug-gnu-emacs@gnu.org; Sun, 14 Sep 2008 21:04:46 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:36465) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kf2W4-0001je-KY; Sun, 14 Sep 2008 21:04:37 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m8F14PfT009840; Mon, 15 Sep 2008 10:04:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m8F14PCb003111; Mon, 15 Sep 2008 10:04:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m8F14PwT003853; Mon, 15 Sep 2008 10:04:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1Kf2Vt-0003Ve-3W; Mon, 15 Sep 2008 10:04:25 +0900 In-reply-to: (rms@gnu.org) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 14 Sep 2008 21:27:38 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20545 Archived-At: In article , "Richard M. Stallman" writes: > There must be a bug in the logic that decides whether to make a new > code-conversion buffer, so that it makes too many of them. > The code looks inefficient too. Even when it reuses the > code-conversion buffer, it calls Fget_buffer_create. > It seems to be killing and recreating these buffers, > which must be slow. ??? I don't see what's wrong with the current code. I think the functions make_conversion_work_buffer, code_conversion_save, and code_conversion_restore do the right thing. > I think it would be better to make one and never kill it. > Handa-san, under what circumstances should it need to use more than > one of these buffers? Can character set encoding and decoding ever be > done recursively? It seems to me that that should never happen, so > one such buffer should be enough. There are two cases that multiple work buffers are necessary. (1) A coding system can have pre-write-conversion function, and that function can call code-conversion function recursively. (2) If REPLACE arg is non-nil in insert-file-contents and a file need a decoding, we call decode_coding_c_string while a work buffer is in use. Anyway, I fixed one bug in insert-file-contents. It failed to run code_conversion_restore in one situation. So, could you try again with the latest code? --- Kenichi Handa handa@ni.aist.go.jp