From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Odd slowness in grep and dired modes Date: Fri, 21 Mar 2014 10:13:06 +0200 Message-ID: <83zjkk55rh.fsf@gnu.org> References: <3a2879e3-cb96-495c-a6a4-6bb790449477@googlegroups.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1395389599 2992 80.91.229.3 (21 Mar 2014 08:13:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 08:13:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 09:13:28 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQuZx-0007Oj-OR for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 09:13:25 +0100 Original-Received: from localhost ([::1]:51222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQuZx-0005zc-A1 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 04:13:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQuZa-0005sM-TK for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 04:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQuZQ-0006r0-Jb for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 04:13:02 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:32869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQuZQ-0006qj-BP for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 04:12:52 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N2S000001FXKV00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 10:12:50 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2S000NE1HE92B0@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 10:12:50 +0200 (IST) In-reply-to: <3a2879e3-cb96-495c-a6a4-6bb790449477@googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:96663 Archived-At: > Date: Thu, 20 Mar 2014 23:10:52 -0700 (PDT) > From: Smith_RS > > 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.