From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 22.1.50; insert-file-contents is slow under tramp Date: Thu, 23 Aug 2007 16:25:32 +0200 Message-ID: <46CD98DC.1050701@gmx.at> References: <87veb6l9b0.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070906000202050908020704" X-Trace: sea.gmane.org 1187879169 7354 80.91.229.12 (23 Aug 2007 14:26:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2007 14:26:09 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 23 16:26:05 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IODdJ-0005jQ-Gp for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2007 16:26:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IODdI-0007hx-Px for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2007 10:26:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IODdF-0007go-0l for emacs-devel@gnu.org; Thu, 23 Aug 2007 10:25:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IODdE-0007gE-Ax for emacs-devel@gnu.org; Thu, 23 Aug 2007 10:25:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IODdE-0007gA-7s for emacs-devel@gnu.org; Thu, 23 Aug 2007 10:25:56 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IODdD-00013y-VR for emacs-devel@gnu.org; Thu, 23 Aug 2007 10:25:56 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IODhC-0003EC-Pj for emacs-pretest-bug@gnu.org; Thu, 23 Aug 2007 10:30:02 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IODdD-00013g-1O for emacs-pretest-bug@gnu.org; Thu, 23 Aug 2007 10:25:55 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IODdC-00013A-J1 for emacs-pretest-bug@gnu.org; Thu, 23 Aug 2007 10:25:54 -0400 Original-Received: (qmail invoked by alias); 23 Aug 2007 14:25:51 -0000 Original-Received: from N708P011.adsl.highway.telekom.at (EHLO [62.47.32.107]) [62.47.32.107] by mail.gmx.net (mp027) with SMTP; 23 Aug 2007 16:25:51 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19jt9Uf2sxj344dkxwe3ORG73iTFxWqILSRDobT7g Itci//t4UfG5nN User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87veb6l9b0.fsf@escher.local.home> X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:77030 gmane.emacs.pretest.bugs:19595 Archived-At: This is a multi-part message in MIME format. --------------070906000202050908020704 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > Using edebug I found the slowdown occurs when insert-file-contents is > called in find-file-noselect-1. I don't know how to debug it further. > This slowdown did not exist in my previous Emacs build from 2007-06-30. Stefan found a bug in my recent changes to `insert-file-contents'. I can't tell whether it's related to your problem but could you try with the attached patch? --------------070906000202050908020704 Content-Type: text/plain; name="fileio.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fileio.patch" *** fileio.c Sat Aug 18 09:50:08 2007 --- fileio.c Thu Aug 23 11:04:32 2007 *************** *** 4733,4746 **** int opoint = PT; int opoint_byte = PT_BYTE; int oinserted = ZV - BEGV; TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); insval = call3 (Qformat_decode, Qnil, make_number (oinserted), visit); CHECK_NUMBER (insval); ! if (XINT (insval) == oinserted) SET_PT_BOTH (opoint, opoint_byte); ! inserted = XFASTINT (insval); } /* For consistency with format-decode call these now iff inserted > 0 --- 4733,4753 ---- int opoint = PT; int opoint_byte = PT_BYTE; int oinserted = ZV - BEGV; + int ochars_modiff = CHARS_MODIFF; TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); insval = call3 (Qformat_decode, Qnil, make_number (oinserted), visit); CHECK_NUMBER (insval); ! if (ochars_modiff == CHARS_MODIFF) ! /* format_decode didn't modify buffer's characters => move ! point back to position before inserted text and leave ! value of inserted alone. */ SET_PT_BOTH (opoint, opoint_byte); ! else ! /* format_decode modified buffer's characters => consider ! entire buffer changed and leave point at point-min. */ ! inserted = XFASTINT (insval); } /* For consistency with format-decode call these now iff inserted > 0 *************** *** 4763,4777 **** int opoint = PT; int opoint_byte = PT_BYTE; int oinserted = ZV - BEGV; ! TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); insval = call1 (XCAR (p), make_number (oinserted)); if (!NILP (insval)) { CHECK_NUMBER (insval); ! if (XINT (insval) == oinserted) SET_PT_BOTH (opoint, opoint_byte); ! inserted = XFASTINT (insval); } } --- 4770,4793 ---- int opoint = PT; int opoint_byte = PT_BYTE; int oinserted = ZV - BEGV; ! int ochars_modiff = CHARS_MODIFF; ! TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); insval = call1 (XCAR (p), make_number (oinserted)); if (!NILP (insval)) { CHECK_NUMBER (insval); ! if (ochars_modiff == CHARS_MODIFF) ! /* after_insert_file_functions didn't modify ! buffer's characters => move point back to ! position before inserted text and leave value of ! inserted alone. */ SET_PT_BOTH (opoint, opoint_byte); ! else ! /* after_insert_file_functions did modify buffer's ! characters => consider entire buffer changed and ! leave point at point-min. */ ! inserted = XFASTINT (insval); } } --------------070906000202050908020704 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------070906000202050908020704--