* Odd slowness in grep and dired modes
@ 2014-03-21 6:10 Smith_RS
2014-03-21 8:13 ` Eli Zaretskii
[not found] ` <mailman.17728.1395389591.10748.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Smith_RS @ 2014-03-21 6:10 UTC (permalink / raw)
To: help-gnu-emacs
This is for NT Emacs 24.3.1 running on Windows 7.
I found a situation where NT Emacs will slow to a crawl and consume high CPU cycles, the common behavior is directory browsing in dired or file browsing in grep-mode where the mouse-over behavior is being used. I ran the profiler and saw that all the time is spent in mouse-fixup-help-message.
Steps to duplicate:
- Open dired on a directory with a non trivial number of files (20 or more).
- Run the mouse over the files without selecting anything, just let the mouse-over behavior happen.
- Do this with profiling turned on and observe thousands of calls to mouse-fixup-help-message.
Alternately:
- Use grep-mode to search for a string that occurs in a large number of files.
- Continue as above.
I ran with Procmon, there is no specific I/O or registry activity during this slowness that I can trace.
I tried this under Linux, I see the calls to mouse-fixup-help-message but it doesn't jack the CPU like on Windows.
Any thoughts or ways to debug this are appreciated, as always.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
2014-03-21 6:10 Odd slowness in grep and dired modes Smith_RS
@ 2014-03-21 8:13 ` Eli Zaretskii
[not found] ` <mailman.17728.1395389591.10748.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-03-21 8:13 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 20 Mar 2014 23:10:52 -0700 (PDT)
> From: Smith_RS <rsmithpv@gmail.com>
>
> This is for NT Emacs 24.3.1 running on Windows 7.
>
> I found a situation where NT Emacs will slow to a crawl and consume high CPU cycles, the common behavior is directory browsing in dired or file browsing in grep-mode where the mouse-over behavior is being used. I ran the profiler and saw that all the time is spent in mouse-fixup-help-message.
>
> Steps to duplicate:
>
> - Open dired on a directory with a non trivial number of files (20 or more).
> - Run the mouse over the files without selecting anything, just let the mouse-over behavior happen.
> - Do this with profiling turned on and observe thousands of calls to mouse-fixup-help-message.
>
> Alternately:
>
> - Use grep-mode to search for a string that occurs in a large number of files.
> - Continue as above.
What exactly "slows to a crawl" in these situations?
I tried the first scenario, in a very large directory, and all I could
see that moving the mouse constantly over the file names makes a
single execution unit occupied by 27%. I see no particular slow-down,
but since Emacs does nothing but display tooltips, I'm not sure what
operations would be slow in this scenario.
mouse-fixup-help-message generates the text for the tooltip shown when
you have the mouse above the file name, so it is called whenever you
move the mouse to another file.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
[not found] ` <mailman.17728.1395389591.10748.help-gnu-emacs@gnu.org>
@ 2014-03-21 8:25 ` Smith_RS
2014-03-21 8:57 ` Eli Zaretskii
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Smith_RS @ 2014-03-21 8:25 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, March 21, 2014 1:13:06 AM UTC-7, Eli Zaretskii wrote:
> What exactly "slows to a crawl" in these situations?
I trace Emacs using Process Explorer, on a machine with 4 available cores I see 25% utilization which (to my understanding) means it's at 100% on that core. It takes as long as 30 seconds to a minute to catch up.
If I do a non-trivial grep, my attempts to select files out of the grep results creates enough lag to make the selection process not usable.
Even when I do all the things to turn off tooltips it doesn't stop the behavior. I've tried these:
(setq tooltip-mode nil)
(setq show-help-function nil)
If there were a way to intercept the call to mouse-fixup-help-message so that it just does a "no-op" that would solve this for me.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
2014-03-21 8:25 ` Smith_RS
@ 2014-03-21 8:57 ` Eli Zaretskii
2014-03-21 14:39 ` Drew Adams
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-03-21 8:57 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 21 Mar 2014 01:25:46 -0700 (PDT)
> From: Smith_RS <rsmithpv@gmail.com>
> Injection-Date: Fri, 21 Mar 2014 08:25:46 +0000
>
> On Friday, March 21, 2014 1:13:06 AM UTC-7, Eli Zaretskii wrote:
> > What exactly "slows to a crawl" in these situations?
>
> I trace Emacs using Process Explorer, on a machine with 4 available cores I see 25% utilization which (to my understanding) means it's at 100% on that core. It takes as long as 30 seconds to a minute to catch up.
Nothing similar is seen on my system.
> If I do a non-trivial grep, my attempts to select files out of the grep results creates enough lag to make the selection process not usable.
Sorry, I don't understand: lag between which events?
> Even when I do all the things to turn off tooltips it doesn't stop the behavior.
Which means the mouse-fixup-help-message is a red herring. Some other
factor is at work here.
Did this start lately? If so, what changed around the time this
started happening?
Also, does this happen in "emacs -Q"? If not, I'd suspect some
customization you have on your .emacs init file.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Odd slowness in grep and dired modes
2014-03-21 8:25 ` Smith_RS
2014-03-21 8:57 ` Eli Zaretskii
@ 2014-03-21 14:39 ` Drew Adams
[not found] ` <mailman.17734.1395392229.10748.help-gnu-emacs@gnu.org>
[not found] ` <mailman.17763.1395412779.10748.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2014-03-21 14:39 UTC (permalink / raw)
To: Smith_RS, help-gnu-emacs
> If there were a way to intercept the call to mouse-fixup-help-message so
> that it just does a "no-op" that would solve this for me.
If `mouse-fixup-help-message' is the problem, just say no to it:
Do yourself a favor and customize `mouse-1-click-follows-link' to nil.
(Just one opinion.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
[not found] ` <mailman.17734.1395392229.10748.help-gnu-emacs@gnu.org>
@ 2014-03-21 16:41 ` Smith_RS
2014-03-21 16:54 ` Eli Zaretskii
[not found] ` <mailman.17774.1395420855.10748.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Smith_RS @ 2014-03-21 16:41 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, March 21, 2014 1:57:07 AM UTC-7, Eli Zaretskii wrote:
> Sorry, I don't understand: lag between which events?
Both dired and grep-find give you a list of targets that you can select via mouse-1 or mouse-2, which causes the target file to open in another window. While this list is active you can mouse-over the targets and Emacs will change the face from the default face to the highlighted face, this is the part that's slowing down.
> Did this start lately? If so, what changed around the time this
> started happening?
It started happening when I started using grep-find mode more intensely, to search through hundreds or even thousands of files. I then started noticing dired do the same thing but not to the same extent because I wasn't working with super-long lists of results.
I'm a heavy org-mode user so I often need to find something in a notes file that's several years old (grepping through old notes files is basically how I do my life. :)
> Also, does this happen in "emacs -Q"? If not, I'd suspect some
> customization you have on your .emacs init file.
Yes.
(NOTE: See below, Drew's idea worked. Thanks for your help)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
2014-03-21 16:41 ` Smith_RS
@ 2014-03-21 16:54 ` Eli Zaretskii
[not found] ` <mailman.17774.1395420855.10748.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-03-21 16:54 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 21 Mar 2014 09:41:33 -0700 (PDT)
> From: Smith_RS <rsmithpv@gmail.com>
>
> (NOTE: See below, Drew's idea worked. Thanks for your help)
So let me know if you still want to pursue the original issue.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
[not found] ` <mailman.17763.1395412779.10748.help-gnu-emacs@gnu.org>
@ 2014-03-21 17:09 ` Smith_RS
0 siblings, 0 replies; 9+ messages in thread
From: Smith_RS @ 2014-03-21 17:09 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, March 21, 2014 7:39:09 AM UTC-7, Drew Adams wrote:
> Do yourself a favor and customize `mouse-1-click-follows-link' to nil.
Thanks, this worked:
(setq mouse-1-click-follows-link nil)
The 450ms delay loop is causing some sort of problem, not sure what that might be or how to debug it.
I am running the pre-built NT Emacs on Windows 7 (SP1 Enterprise) 64-bit. My system has an NVidia 4200M chipset with a GPU, but I don't see that coming into play here.
Thanks again for the help.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Odd slowness in grep and dired modes
[not found] ` <mailman.17774.1395420855.10748.help-gnu-emacs@gnu.org>
@ 2014-03-21 17:26 ` Smith_RS
0 siblings, 0 replies; 9+ messages in thread
From: Smith_RS @ 2014-03-21 17:26 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, March 21, 2014 9:54:14 AM UTC-7, Eli Zaretskii wrote:
> So let me know if you still want to pursue the original issue.
I'm good, thanks. Like I said, Procmon didn't reveal anything unusual, so the next step would probably be IDE-level debugging, and I'm not set up for that.
Again, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-21 17:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 6:10 Odd slowness in grep and dired modes Smith_RS
2014-03-21 8:13 ` Eli Zaretskii
[not found] ` <mailman.17728.1395389591.10748.help-gnu-emacs@gnu.org>
2014-03-21 8:25 ` Smith_RS
2014-03-21 8:57 ` Eli Zaretskii
2014-03-21 14:39 ` Drew Adams
[not found] ` <mailman.17734.1395392229.10748.help-gnu-emacs@gnu.org>
2014-03-21 16:41 ` Smith_RS
2014-03-21 16:54 ` Eli Zaretskii
[not found] ` <mailman.17774.1395420855.10748.help-gnu-emacs@gnu.org>
2014-03-21 17:26 ` Smith_RS
[not found] ` <mailman.17763.1395412779.10748.help-gnu-emacs@gnu.org>
2014-03-21 17:09 ` Smith_RS
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).