unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* window-scroll-functions and performance
@ 2011-08-15 19:48 Antoine Levitt
  2011-08-15 20:28 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Antoine Levitt @ 2011-08-15 19:48 UTC (permalink / raw)
  To: emacs-devel

Hi,

I'm trying to track down the cause of performance issues in erc. One
problem is with erc-scroll-to-bottom. Here's a simple test: emacs -Q,
M-x erc, accept the default, M-x erc-scrolltobottom-mode, C-l to force
scrolltobottom to act, M-x elp-instrument-package erc, press and
maintain "a" for a while, then M-x elp-results. erc-scrolltobottom gets
called a lot, and that causes noticeable slowdowns: display doesn't keep
up with input, and CPU consumption jumps. This gets my emacs to 100% CPU
just inserting text.

Is it normal that window-scroll-functions gets called this much? Any
idea on how to improve scrolltobottom?




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

* Re: window-scroll-functions and performance
  2011-08-15 19:48 window-scroll-functions and performance Antoine Levitt
@ 2011-08-15 20:28 ` Eli Zaretskii
  2011-08-15 21:02   ` Antoine Levitt
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-08-15 20:28 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: emacs-devel

> From: Antoine Levitt <antoine.levitt@gmail.com>
> Date: Mon, 15 Aug 2011 21:48:00 +0200
> 
> I'm trying to track down the cause of performance issues in erc. One
> problem is with erc-scroll-to-bottom. Here's a simple test: emacs -Q,
> M-x erc, accept the default, M-x erc-scrolltobottom-mode, C-l to force
> scrolltobottom to act, M-x elp-instrument-package erc, press and
> maintain "a" for a while, then M-x elp-results. erc-scrolltobottom gets
> called a lot, and that causes noticeable slowdowns: display doesn't keep
> up with input, and CPU consumption jumps. This gets my emacs to 100% CPU
> just inserting text.

Does the problem go away if you turn bidi-display-reordering off?
Does it go away if you use Emacs 23.3?

If the answer to any of these 2 questions is YES, please try to come
up with a reproducible test case that doesn't involve erc, and I will
take a look.

Thanks.



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

* Re: window-scroll-functions and performance
  2011-08-15 20:28 ` Eli Zaretskii
@ 2011-08-15 21:02   ` Antoine Levitt
  2011-08-16  5:56     ` Thierry Volpiatto
  2011-08-16  6:49     ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Antoine Levitt @ 2011-08-15 21:02 UTC (permalink / raw)
  To: emacs-devel

15/08/11 22:28, Eli Zaretskii
>> From: Antoine Levitt <antoine.levitt@gmail.com>
>> Date: Mon, 15 Aug 2011 21:48:00 +0200
>> 
>> I'm trying to track down the cause of performance issues in erc. One
>> problem is with erc-scroll-to-bottom. Here's a simple test: emacs -Q,
>> M-x erc, accept the default, M-x erc-scrolltobottom-mode, C-l to force
>> scrolltobottom to act, M-x elp-instrument-package erc, press and
>> maintain "a" for a while, then M-x elp-results. erc-scrolltobottom gets
>> called a lot, and that causes noticeable slowdowns: display doesn't keep
>> up with input, and CPU consumption jumps. This gets my emacs to 100% CPU
>> just inserting text.
>
> Does the problem go away if you turn bidi-display-reordering off?

Nope. (though it does reduce CPU usage a bit - from 100% to 85 here)

> Does it go away if you use Emacs 23.3?

No, it's not a new bug.

> If the answer to any of these 2 questions is YES, please try to come
> up with a reproducible test case that doesn't involve erc, and I will
> take a look.

There does not seem to be many people using ERC on this list, and
consequently not a lot of work on it, it's a shame.




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

* Re: window-scroll-functions and performance
  2011-08-15 21:02   ` Antoine Levitt
@ 2011-08-16  5:56     ` Thierry Volpiatto
  2011-08-16  6:38       ` Eli Zaretskii
  2011-08-16  6:49     ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2011-08-16  5:56 UTC (permalink / raw)
  To: emacs-devel

Antoine Levitt <antoine.levitt@gmail.com> writes:

> 15/08/11 22:28, Eli Zaretskii
>>> From: Antoine Levitt <antoine.levitt@gmail.com>
>>> Date: Mon, 15 Aug 2011 21:48:00 +0200
>>> 
>>> I'm trying to track down the cause of performance issues in erc. One
>>> problem is with erc-scroll-to-bottom. Here's a simple test: emacs -Q,
>>> M-x erc, accept the default, M-x erc-scrolltobottom-mode, C-l to force
>>> scrolltobottom to act, M-x elp-instrument-package erc, press and
>>> maintain "a" for a while, then M-x elp-results. erc-scrolltobottom gets
>>> called a lot, and that causes noticeable slowdowns: display doesn't keep
>>> up with input, and CPU consumption jumps. This gets my emacs to 100% CPU
>>> just inserting text.
>>
>> Does the problem go away if you turn bidi-display-reordering off?
>
> Nope. (though it does reduce CPU usage a bit - from 100% to 85 here)
>
>> Does it go away if you use Emacs 23.3?
>
> No, it's not a new bug.
>
>> If the answer to any of these 2 questions is YES, please try to come
>> up with a reproducible test case that doesn't involve erc, and I will
>> take a look.
>
> There does not seem to be many people using ERC on this list, and
> consequently not a lot of work on it, it's a shame.

Similar to this, scrolling in org buffers is actually very slow
(impossible to use) unless all headers are open.
Turning off bidi solve problem:
(add-hook 'org-mode-hook #'(lambda () (setq bidi-display-reordering
nil)))

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




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

* Re: window-scroll-functions and performance
  2011-08-16  5:56     ` Thierry Volpiatto
@ 2011-08-16  6:38       ` Eli Zaretskii
  2011-08-16  8:03         ` Thierry Volpiatto
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-08-16  6:38 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
> Date: Tue, 16 Aug 2011 07:56:23 +0200
> 
> Similar to this, scrolling in org buffers is actually very slow
> (impossible to use) unless all headers are open.
> Turning off bidi solve problem:

Please show me an example of a file where it is "impossible to use"
scrolling.  Also, please tell which scrolling commands you used, and
make sure this problem exists in "emacs -Q".  I will then look into
this.  You can file a bug report if you wish.

Thanks.

(I do use Org mode, and I have a huge Org file, and I cannot say that
scrolling there is impossible to use, even on my 6-year old hardware.
But perhaps your Org files have something special in them that
triggers this problem.)



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

* Re: window-scroll-functions and performance
  2011-08-15 21:02   ` Antoine Levitt
  2011-08-16  5:56     ` Thierry Volpiatto
@ 2011-08-16  6:49     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-08-16  6:49 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: emacs-devel

> From: Antoine Levitt <antoine.levitt@gmail.com>
> Date: Mon, 15 Aug 2011 23:02:10 +0200
> 
> > Does the problem go away if you turn bidi-display-reordering off?
> 
> Nope. (though it does reduce CPU usage a bit - from 100% to 85 here)
> 
> > Does it go away if you use Emacs 23.3?
> 
> No, it's not a new bug.

Well, in that case the priority of this bug would be low, but please
consider coming up with a test case anyway.  And of course, report it
to the tracker.  I will try to look into this some time soon.

Thanks.



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

* Re: window-scroll-functions and performance
  2011-08-16  6:38       ` Eli Zaretskii
@ 2011-08-16  8:03         ` Thierry Volpiatto
  2011-08-16  9:12           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2011-08-16  8:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
>> Date: Tue, 16 Aug 2011 07:56:23 +0200
>> 
>> Similar to this, scrolling in org buffers is actually very slow
>> (impossible to use) unless all headers are open.
>> Turning off bidi solve problem:
>
> Please show me an example of a file where it is "impossible to use"
> scrolling.  Also, please tell which scrolling commands you used, and
> make sure this problem exists in "emacs -Q".  I will then look into
> this.  You can file a bug report if you wish.
This happen in emacs -Q too.
All scrolling commands, but also next/previous-line are affected.

Unfortunately i have no example file to send. My org files are quite big
and contain personal notes and infos.


> Thanks.
>
> (I do use Org mode, and I have a huge Org file, and I cannot say that
> scrolling there is impossible to use, even on my 6-year old hardware.
> But perhaps your Org files have something special in them that
> triggers this problem.)
Perhaps, do you have things like

#+BEGIN_SRC lisp
;; some lisp code here
#+END_SRC

in your org files?

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



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

* Re: window-scroll-functions and performance
  2011-08-16  8:03         ` Thierry Volpiatto
@ 2011-08-16  9:12           ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-08-16  9:12 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 16 Aug 2011 10:03:38 +0200
> 
> This happen in emacs -Q too.
> All scrolling commands, but also next/previous-line are affected.

Please do list those scrolling commands.  I've found from bitter
experience that making assumptions here leads to wrong conclusions.

> Unfortunately i have no example file to send. My org files are quite big
> and contain personal notes and infos.

Does this happen only in large files?  Can you try in progressively
smaller fragments of those files, and see if the problem gets worse
with the size?  If size is the key factor, I'd need to know at least
the size where it becomes unbearably slow, and the approximate number
of entries at each level.  Then I could try generating a dummy Org
file with a similar structure, and see if I can reproduce the problem.

One more thing to try: leave `bidi-display-reordering' on, but set
`bidi-paragraph-direction' to `left-to-right', then tell me if the
slow-down goes away, at least partially.

> Perhaps, do you have things like
> 
> #+BEGIN_SRC lisp
> ;; some lisp code here
> #+END_SRC
> 
> in your org files?

No.  Does the mere presence of this even in small Org files trigger
the slow-down?  Does removing this cause the slow-down to go away?  If
yes, please show the Lisp you've got there, or at least describe
enough of it so I could recreate it here.

Thanks.



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

end of thread, other threads:[~2011-08-16  9:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 19:48 window-scroll-functions and performance Antoine Levitt
2011-08-15 20:28 ` Eli Zaretskii
2011-08-15 21:02   ` Antoine Levitt
2011-08-16  5:56     ` Thierry Volpiatto
2011-08-16  6:38       ` Eli Zaretskii
2011-08-16  8:03         ` Thierry Volpiatto
2011-08-16  9:12           ` Eli Zaretskii
2011-08-16  6:49     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).