all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
@ 2011-09-23 16:18 Le Wang
  2011-09-23 16:39 ` Drew Adams
  2011-09-23 17:16 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Le Wang @ 2011-09-23 16:18 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

On Thu, Sep 22, 2011 at 12:30 PM, Drew Adams <drew.adams@oracle.com> wrote:

> Are you using the development version of Emacs (aka Emacs 24)?
>
> If so, I have no idea whether this will help or help you find the problem,
> but
> you might try doing this to see if it makes a difference:
>
> (setq-default bidi-display-reordering  nil)
>

This helped me with my slow scroll issues.  Holding down arrow on a fully
maximized frame on a 1080p monitor was spiking my duo-core CPU to 20-25%.
Scrolling text.  50% of one CPU.  Just to scroll text.  And it would start
jumping around almost right away.  With this setting, it goes down to 8-14%
while scrolling.  Still kind of silly, but that's better than emacs23.

Do you have any other useful emacs24 settings?

-- 
Le

[-- Attachment #2: Type: text/html, Size: 1047 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 16:18 new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files) Le Wang
@ 2011-09-23 16:39 ` Drew Adams
  2011-09-23 17:16 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Drew Adams @ 2011-09-23 16:39 UTC (permalink / raw)
  To: 'Le Wang'; +Cc: help-gnu-emacs

> Drew Adams wrote:
>> Are you using the development version of Emacs (aka Emacs 24)?
>> If so, I have no idea whether this will help or help you find
>> the problem, but you might try doing this to see if it makes a
>> difference: (setq-default bidi-display-reordering  nil)
>
> This helped me with my slow scroll issues.  Holding down arrow on
> a fully maximized frame on a 1080p monitor was spiking my
> duo-core CPU to 20-25%.  Scrolling text.  50% of one CPU.
> Just to scroll text.  And it would start jumping around almost
> right away.  With this setting, it goes down to 8-14% while
> scrolling.  Still kind of silly, but that's better than emacs23.

Please try to report your experience using `report-emacs-bug'.  Eli Z., who is
the developer working on bidi support, would _very_ much appreciate knowing
about any such issues.  It's not obvious to him what might not work well, unless
he receives a bug report.  The more specific you can be, the better.
	
> Do you have any other useful emacs24 settings?

Nope, not yet.  There have been quite a few changes made to the way (where, how)
buffers get displayed, but that development seems to still be in flux
(redefinition).  If you experience odd behavior wrt buffer display, please
report it as a bug.

As always, if it turns out that there is no bug, the Emacs developers will be
happy to let you know.  When in doubt, report something as a bug, to provide
them the info.  They can then sort things out.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 16:18 new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files) Le Wang
  2011-09-23 16:39 ` Drew Adams
@ 2011-09-23 17:16 ` Eli Zaretskii
  2011-09-23 17:44   ` Le Wang
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-09-23 17:16 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 24 Sep 2011 00:18:00 +0800
> From: Le Wang <l26wang@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > (setq-default bidi-display-reordering  nil)
> >
> 
> This helped me with my slow scroll issues.  Holding down arrow on a fully
> maximized frame on a 1080p monitor was spiking my duo-core CPU to 20-25%.
> Scrolling text.  50% of one CPU.  Just to scroll text.

Scrolling how (by what commands)?  What kind of text?  What was the
major mode in that buffer?  Some modes are more expensive in redisplay
than others.  It is impossible to tell whether 50% of a core is
unreasonably high without knowing these details.

> And it would start jumping around almost right away.

Does it behave better if you set redisplay-dont-pause to a non-nil
value?  This will be the default in Emacs 24.

> Do you have any other useful emacs24 settings?

If you tell the details I asked about before, someone might be able to
give you more advice.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 17:16 ` Eli Zaretskii
@ 2011-09-23 17:44   ` Le Wang
  2011-09-23 17:58     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Le Wang @ 2011-09-23 17:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]

On Sat, Sep 24, 2011 at 1:16 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 24 Sep 2011 00:18:00 +0800
> > From: Le Wang <l26wang@gmail.com>
> > Cc: help-gnu-emacs@gnu.org
> >
> > > (setq-default bidi-display-reordering  nil)
> > >
> >
> > This helped me with my slow scroll issues.  Holding down arrow on a fully
> > maximized frame on a 1080p monitor was spiking my duo-core CPU to 20-25%.
> > Scrolling text.  50% of one CPU.  Just to scroll text.
>
> Scrolling how (by what commands)?


next-line


>  What kind of text?  What was the
> major mode in that buffer?


emacs-lisp large file

I also use full font-lock salad colors with "Consolas" font on Windows.
Also I use several minor-modes that add pre or post-command-hooks.


> Some modes are more expensive in redisplay
> than others.  It is impossible to tell whether 50% of a core is
> unreasonably high without knowing these details.
>

Additionally I have these scroll related settings.  Some of which I added
after realizing scrolling was slow, others I had previously to enable smooth
scrolling.

(setq hscroll-step                    1
      scroll-conservatively           10000
      scroll-preserve-screen-position t
      auto-window-vscroll             nil           ; speedup down scroll
      scroll-margin                   10
      redisplay-dont-pause            t             ; this will be default
in emacs24
      )



> > And it would start jumping around almost right away.
>
> Does it behave better if you set redisplay-dont-pause to a non-nil
> value?  This will be the default in Emacs 24.
>

It's not making a noticeable difference.  Although it sounds like a good
idea.

To be clear, I get perfectly smooth scrolling now with bidi-display-ordering
set to nil.  And my CPU usage doesn't exceed 12% while scrolling.  So things
are good now.

-- 
Le

[-- Attachment #2: Type: text/html, Size: 2877 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 17:44   ` Le Wang
@ 2011-09-23 17:58     ` Eli Zaretskii
  2011-09-23 18:32       ` Le Wang
  2011-09-23 19:05       ` new emacs24 settings (was: Re: Performance problems (CPU 100%)with " Drew Adams
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-09-23 17:58 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 24 Sep 2011 01:44:03 +0800
> From: Le Wang <l26wang@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > > This helped me with my slow scroll issues.  Holding down arrow on a fully
> > > maximized frame on a 1080p monitor was spiking my duo-core CPU to 20-25%.
> > > Scrolling text.  50% of one CPU.  Just to scroll text.
> >
> > Scrolling how (by what commands)?
> 
> 
> next-line

What was the value of line-move-visual?  Under the default non-nil
setting, next-line is pretty expensive.

> >  What kind of text?  What was the major mode in that buffer?
> 
> emacs-lisp large file

How large?

Does it matter whether you are close to the file's beginning or to its
end?

Does anything change if, after visiting the file, you first type

  M-: (font-lock-default-fontify-buffer) RET

and only then try scrolling?

> I also use full font-lock salad colors with "Consolas" font on Windows.
> Also I use several minor-modes that add pre or post-command-hooks.

If you remove those pre/post-command hooks, does the scrolling speed
improve significantly?  Can you find a hook that has the most profound
effect?

> > Does it behave better if you set redisplay-dont-pause to a non-nil
> > value?  This will be the default in Emacs 24.
> >
> 
> It's not making a noticeable difference.

With or without bidi-display-reordering?  I asked about its effect
when bidi-display-reordering is left at its default t value.

> To be clear, I get perfectly smooth scrolling now with bidi-display-ordering
> set to nil.  And my CPU usage doesn't exceed 12% while scrolling.  So things
> are good now.

I encourage you to provide more details about this slowdown, so that
bidirectional display in Emacs 24 could be sped up.  Turning off
bidi-display-reordering is not a supported mode, that is an internal
variable that is not designed to be toggled by users.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 17:58     ` Eli Zaretskii
@ 2011-09-23 18:32       ` Le Wang
  2011-09-23 19:02         ` Eli Zaretskii
  2011-09-23 19:05       ` new emacs24 settings (was: Re: Performance problems (CPU 100%)with " Drew Adams
  1 sibling, 1 reply; 12+ messages in thread
From: Le Wang @ 2011-09-23 18:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

On Sat, Sep 24, 2011 at 1:58 AM, Eli Zaretskii <eliz@gnu.org> wrote:

>
> > next-line
> What was the value of line-move-visual?  Under the default non-nil
> setting, next-line is pretty expensive.
>

it was t, setting it to nil didn't help bibi-display much.


>  > >  What kind of text?  What was the major mode in that buffer?
> >
> > emacs-lisp large file
>
> How large?
>
>
allout.el >200k not very large.  large enough to scroll continuously  for 10
seconds of so.

Does it matter whether you are close to the file's beginning or to its
> end?
>
> Does anything change if, after visiting the file, you first type
>
>  M-: (font-lock-default-fontify-buffer) RET
>
and only then try scrolling?
>

no.


> > I also use full font-lock salad colors with "Consolas" font on Windows.
> > Also I use several minor-modes that add pre or post-command-hooks.
>
> If you remove those pre/post-command hooks, does the scrolling speed
> improve significantly?  Can you find a hook that has the most profound
> effect?


no it does not.  the effect of all hooks is about 2-3% CPU.

 > > Does it behave better if you set redisplay-dont-pause to a non-nil
> > > value?  This will be the default in Emacs 24.
> > >
> >
> > It's not making a noticeable difference.
>
> With or without bidi-display-reordering?  I asked about its effect
> when bidi-display-reordering is left at its default t value.
>

I tried it with bidi and without, difference wasn't huge.

-- 
Le

[-- Attachment #2: Type: text/html, Size: 2713 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 18:32       ` Le Wang
@ 2011-09-23 19:02         ` Eli Zaretskii
  2011-09-24  0:51           ` Le Wang
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-09-23 19:02 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 24 Sep 2011 02:32:24 +0800
> From: Le Wang <l26wang@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> 
> [1:text/plain Hide]
> 
> On Sat, Sep 24, 2011 at 1:58 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >
> > > next-line
> > What was the value of line-move-visual?  Under the default non-nil
> > setting, next-line is pretty expensive.
> >
> 
> it was t, setting it to nil didn't help bibi-display much.
> 
> 
> >  > >  What kind of text?  What was the major mode in that buffer?
> > >
> > > emacs-lisp large file
> >
> > How large?
> >
> >
> allout.el >200k not very large.  large enough to scroll continuously  for 10
> seconds of so.
> 
> Does it matter whether you are close to the file's beginning or to its
> > end?
> >
> > Does anything change if, after visiting the file, you first type
> >
> >  M-: (font-lock-default-fontify-buffer) RET
> >
> and only then try scrolling?
> >
> 
> no.
> 
> 
> > > I also use full font-lock salad colors with "Consolas" font on Windows.
> > > Also I use several minor-modes that add pre or post-command-hooks.
> >
> > If you remove those pre/post-command hooks, does the scrolling speed
> > improve significantly?  Can you find a hook that has the most profound
> > effect?
> 
> 
> no it does not.  the effect of all hooks is about 2-3% CPU.
> 
>  > > Does it behave better if you set redisplay-dont-pause to a non-nil
> > > > value?  This will be the default in Emacs 24.
> > > >
> > >
> > > It's not making a noticeable difference.
> >
> > With or without bidi-display-reordering?  I asked about its effect
> > when bidi-display-reordering is left at its default t value.
> >
> 
> I tried it with bidi and without, difference wasn't huge.

What you tell is very strange, because any reason I could think of are
contradicted by one or more of your answers.

Please file a bug report with the following info:

 . your full .emacs file (assuming the problem is not visible in
   "emacs -Q"; if it is, no need for .emacs)

 . the name of some Lisp file that is part of Emacs which exhibits a
   similar slowdown, and that slowdown disappears when you turn off
   bidi-display-reordering.  alternatively, if you can post the
   specific Lisp file you used in this testing, that'd be best.

With this info, I can look into the problem and see what causes it.

Thanks in advance.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: new emacs24 settings (was: Re: Performance problems (CPU 100%)with NULs in files)
  2011-09-23 17:58     ` Eli Zaretskii
  2011-09-23 18:32       ` Le Wang
@ 2011-09-23 19:05       ` Drew Adams
  1 sibling, 0 replies; 12+ messages in thread
From: Drew Adams @ 2011-09-23 19:05 UTC (permalink / raw)
  To: 'Eli Zaretskii', help-gnu-emacs

> Turning off bidi-display-reordering is not a supported mode,
> that is an internal variable that is not designed to be
> toggled by users.

Uh, Emacs 24 has not been released yet, AFAIK.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9571#77
wrt this variable being internal etc.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-23 19:02         ` Eli Zaretskii
@ 2011-09-24  0:51           ` Le Wang
  2011-09-24  6:17             ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Le Wang @ 2011-09-24  0:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

filed:

bug#9588: Acknowledgement (24.0.50; bidi-display-reordering slowing
scrolling more than expected)

On Sat, Sep 24, 2011 at 3:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Sat, 24 Sep 2011 02:32:24 +0800
> > From: Le Wang <l26wang@gmail.com>
> > Cc: help-gnu-emacs@gnu.org
> >
> >
> > [1:text/plain Hide]
> >
> > On Sat, Sep 24, 2011 at 1:58 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > >
> > > > next-line
> > > What was the value of line-move-visual?  Under the default non-nil
> > > setting, next-line is pretty expensive.
> > >
> >
> > it was t, setting it to nil didn't help bibi-display much.
> >
> >
> > >  > >  What kind of text?  What was the major mode in that buffer?
> > > >
> > > > emacs-lisp large file
> > >
> > > How large?
> > >
> > >
> > allout.el >200k not very large.  large enough to scroll continuously  for 10
> > seconds of so.
> >
> > Does it matter whether you are close to the file's beginning or to its
> > > end?
> > >
> > > Does anything change if, after visiting the file, you first type
> > >
> > >  M-: (font-lock-default-fontify-buffer) RET
> > >
> > and only then try scrolling?
> > >
> >
> > no.
> >
> >
> > > > I also use full font-lock salad colors with "Consolas" font on Windows.
> > > > Also I use several minor-modes that add pre or post-command-hooks.
> > >
> > > If you remove those pre/post-command hooks, does the scrolling speed
> > > improve significantly?  Can you find a hook that has the most profound
> > > effect?
> >
> >
> > no it does not.  the effect of all hooks is about 2-3% CPU.
> >
> >  > > Does it behave better if you set redisplay-dont-pause to a non-nil
> > > > > value?  This will be the default in Emacs 24.
> > > > >
> > > >
> > > > It's not making a noticeable difference.
> > >
> > > With or without bidi-display-reordering?  I asked about its effect
> > > when bidi-display-reordering is left at its default t value.
> > >
> >
> > I tried it with bidi and without, difference wasn't huge.
>
> What you tell is very strange, because any reason I could think of are
> contradicted by one or more of your answers.
>
> Please file a bug report with the following info:
>
>  . your full .emacs file (assuming the problem is not visible in
>   "emacs -Q"; if it is, no need for .emacs)
>
>  . the name of some Lisp file that is part of Emacs which exhibits a
>   similar slowdown, and that slowdown disappears when you turn off
>   bidi-display-reordering.  alternatively, if you can post the
>   specific Lisp file you used in this testing, that'd be best.
>
> With this info, I can look into the problem and see what causes it.
>
> Thanks in advance.
>
>



--
Le



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-24  0:51           ` Le Wang
@ 2011-09-24  6:17             ` Eli Zaretskii
  2011-09-24  7:20               ` Le Wang
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-09-24  6:17 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 24 Sep 2011 08:51:46 +0800
> From: Le Wang <l26wang@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> filed:
> 
> bug#9588: Acknowledgement (24.0.50; bidi-display-reordering slowing
> scrolling more than expected)

Thanks, but I don't see there any of the information I asked you to
include with the bug report.  What am I missing?  I cannot do anything
useful without that info, since you say "emacs -Q" shows only a very
small increase in the CPU consumption.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-24  6:17             ` Eli Zaretskii
@ 2011-09-24  7:20               ` Le Wang
  2011-09-24 11:17                 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Le Wang @ 2011-09-24  7:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Ah sorry, I didn't see that part.  The issue is that I don't have an
init file.  I have several directory structures all started back when
I was trying to maintain compatibility with XEmacs.

I will keep an eye on the issue with bidi-display-reordering set to t.
 It seems to be less pronounced once I added all of the settings you
suggested.  If I narrow it down to anything specific, I'll reply to
the bug number.

On Sat, Sep 24, 2011 at 2:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sat, 24 Sep 2011 08:51:46 +0800
>> From: Le Wang <l26wang@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>>
>> filed:
>>
>> bug#9588: Acknowledgement (24.0.50; bidi-display-reordering slowing
>> scrolling more than expected)
>
> Thanks, but I don't see there any of the information I asked you to
> include with the bug report.  What am I missing?  I cannot do anything
> useful without that info, since you say "emacs -Q" shows only a very
> small increase in the CPU consumption.
>
>



-- 
Le



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files)
  2011-09-24  7:20               ` Le Wang
@ 2011-09-24 11:17                 ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-09-24 11:17 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 24 Sep 2011 15:20:40 +0800
> From: Le Wang <l26wang@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> I will keep an eye on the issue with bidi-display-reordering set to t.
>  It seems to be less pronounced once I added all of the settings you
> suggested.  If I narrow it down to anything specific, I'll reply to
> the bug number.

Thanks.  I will wait for that additional information, then.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-09-24 11:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 16:18 new emacs24 settings (was: Re: Performance problems (CPU 100%) with NULs in files) Le Wang
2011-09-23 16:39 ` Drew Adams
2011-09-23 17:16 ` Eli Zaretskii
2011-09-23 17:44   ` Le Wang
2011-09-23 17:58     ` Eli Zaretskii
2011-09-23 18:32       ` Le Wang
2011-09-23 19:02         ` Eli Zaretskii
2011-09-24  0:51           ` Le Wang
2011-09-24  6:17             ` Eli Zaretskii
2011-09-24  7:20               ` Le Wang
2011-09-24 11:17                 ` Eli Zaretskii
2011-09-23 19:05       ` new emacs24 settings (was: Re: Performance problems (CPU 100%)with " Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.