From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.help Subject: Re: Performance problems (CPU 100%) with NULs in files Date: Sat, 24 Sep 2011 08:50:12 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3030bb01f8ec9e04ada54e89 X-Trace: dough.gmane.org 1316825429 28682 80.91.229.12 (24 Sep 2011 00:50:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Sep 2011 00:50:29 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: "Ludwig, Mark" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 24 02:50:22 2011 Return-path: Envelope-to: geh-help-gnu-emacs@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 1R7GRi-0004G1-7B for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Sep 2011 02:50:22 +0200 Original-Received: from localhost ([::1]:58520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7GRh-0008Dp-3j for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Sep 2011 20:50:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7GRb-0008DZ-HA for help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 20:50:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7GRa-0002Tg-0q for help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 20:50:15 -0400 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:36087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7GRZ-0002Tc-N5 for help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 20:50:13 -0400 Original-Received: by qyl38 with SMTP id 38so7950157qyl.0 for ; Fri, 23 Sep 2011 17:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PRAv6pN0aF5SxS8IOM173otADEZGxyfQVVAS8o4/64o=; b=QuaPJz4ftyka+nd7IzHxmAd7SZsN+rW/CoYnz2OhNuGeIUbyB0xxvFXABH5xiWOx1Z KkL2vDN5t+YhNOqFKPABXBzDae8jGW/RiooNLR/xCUd4XY94do8oH9GsdTJnZ18bLyTJ nMJ0fPOue4Fj0x8XpcAjsrce7q3PP+yNNIyeU= Original-Received: by 10.224.174.70 with SMTP id s6mr3608012qaz.107.1316825412987; Fri, 23 Sep 2011 17:50:12 -0700 (PDT) Original-Received: by 10.224.45.82 with HTTP; Fri, 23 Sep 2011 17:50:12 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82322 Archived-At: --20cf3030bb01f8ec9e04ada54e89 Content-Type: text/plain; charset=ISO-8859-1 File a bug. Let the powers that be decide whether is fix worthy or not. This way even if it's closed as wont fix, at least when someone does a bug search in the future they'll see that a similar issue has come up. On Sat, Sep 24, 2011 at 8:20 AM, Ludwig, Mark wrote: > > From: Eli Zaretskii > > Subject: Re: Performance problems (CPU 100%) with NULs in files > > > > > From: "Ludwig, Mark" > > > Thread-Topic: Performance problems (CPU 100%) with NULs in files > > > Date: Wed, 21 Sep 2011 21:08:42 +0000 > > > > > > What happens is that as I scroll through the file, when the NULs are > > visible, Emacs gets into some intensive processing for a long time > > (minutes, sometimes!). It eventually unwinds and repaints the display, > > but any movement of point sends it into this loop again. I have found > > that M-< or M-> will quickly reposition away from the problem (assuming > > the beginning and/or end of the file do not contain NULs). Most other > > movement operations send it into the loop. > > > > Does it help to visit such files without code conversions, i.e. > > > > M-x find-file-literally RET FILENAME RET > > > > ? > > > > If not, please file a bug report and attach to it an example file that > > causes this slowdown. > > Thanks for the advice, but I have investigated and decided this is probably > too unusual to expect any "fix" for it. > > What I have found is that the "problem" is due to a "line" of text being > extremely long. In the test file I have, it is ~800,000 characters (bytes). > (It came to me with NULs, but I can replace those with any other printable > character and get the same result.) > > What I find is that some movement actions are rather slow -- take 4-7 > seconds -- while others are extremely quick. Specifically, the "forward" > movement actions (C-e, M-f) are slow, while the "backward" movement actions > (C-a, M-b) are instantaneous. Reposition (C-l) is also slow, as are the > line-oriented commands (C-p, C-n). > > Thinking through the magnitude of the oddity, I don't think it would be > reasonable to expect Emacs to handle this any better than it does. It's > just gratifying that C-g works, so I can interrupt it when I stumble into > some junk, and now that I know which actions are fast and slow, I can work > around it. > > OTOH, if you guys really think this is worth asking any developer to fix, > I'll file a bug report. I don't need to send any data, because it's easy to > reproduce this behavior starting with an empty buffer. > > Thanks! > > Mark > > > -- Le --20cf3030bb01f8ec9e04ada54e89 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable File a bug.=A0 Let the powers that be decide whether is fix worthy or not.<= br>
This way even if it's closed as wont fix, at least when someone = does a bug search in the future they'll see that a similar issue has co= me up.

On Sat, Sep 24, 2011 at 8:20 AM, Ludwig, Mar= k <ludwig.m= ark@siemens.com> wrote:
> From: Eli Zaretskii
> Subject: Re: Performance problems (CPU 100%) with NULs in files
>
> > From: "Ludwig, Mark" <ludwig.mark@siemens.com>
> > Thread-Topic: Performance problems (CPU 100%) with NULs in files<= br> > > Date: Wed, 21 Sep 2011 21:08:42 +0000
> >
> > What happens is that as I scroll through the file, when the NULs = are
> visible, Emacs gets into some intensive processing for a long time
> (minutes, sometimes!). =A0It eventually unwinds and repaints the displ= ay,
> but any movement of point sends it into this loop again. =A0I have fou= nd
> that M-< or M-> will quickly reposition away from the problem (a= ssuming
> the beginning and/or end of the file do not contain NULs). =A0Most oth= er
> movement operations send it into the loop.
>
> Does it help to visit such files without code conversions, i.e.
>
> =A0 M-x find-file-literally RET FILENAME RET
>
> ?
>
> If not, please file a bug report and attach to it an example file that=
> causes this slowdown.

Thanks for the advice, but I have investigated and decided this= is probably too unusual to expect any "fix" for it.

What I have found is that the "problem" is due to a "line&qu= ot; of text being extremely long. =A0In the test file I have, it is ~800,00= 0 characters (bytes). =A0(It came to me with NULs, but I can replace those = with any other printable character and get the same result.)

What I find is that some movement actions are rather slow -- take 4-7 secon= ds -- while others are extremely quick. =A0Specifically, the "forward&= quot; movement actions (C-e, M-f) are slow, while the "backward" = movement actions (C-a, M-b) are instantaneous. =A0Reposition (C-l) is also = slow, as are the line-oriented commands (C-p, C-n).

Thinking through the magnitude of the oddity, I don't think it would be= reasonable to expect Emacs to handle this any better than it does. =A0It&#= 39;s just gratifying that C-g works, so I can interrupt it when I stumble i= nto some junk, and now that I know which actions are fast and slow, I can w= ork around it.

OTOH, if you guys really think this is worth asking any developer to fix, I= 'll file a bug report. =A0I don't need to send any data, because it= 's easy to reproduce this behavior starting with an empty buffer.

Thanks!

Mark





--
Le
--20cf3030bb01f8ec9e04ada54e89--