From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#26710: Fwd: 25.2; project-find-regexp makes emacs use 100% cpu Date: Sun, 30 Apr 2017 21:47:31 +0300 Message-ID: <83ziexka0s.fsf@gnu.org> References: <87a86zu3gf.fsf@hari-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83vapnktcn.fsf@gnu.org> <3d76a3ac-32ad-412d-349d-5904fc964a2b@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1493578162 13810 195.159.176.226 (30 Apr 2017 18:49:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2017 18:49:22 +0000 (UTC) Cc: hariharanrangasamy@gmail.com, control@debbugs.gnu.org, 26710@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 30 20:49:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4tuG-0003Q2-Lg for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Apr 2017 20:49:16 +0200 Original-Received: from localhost ([::1]:45605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4tuK-00059Q-QL for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Apr 2017 14:49:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4tu7-000596-4P for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 14:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4tu2-0003v2-Fn for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 14:49:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4tu2-0003uw-Bo for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 14:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d4tu2-0006ZX-5J for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 14:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Apr 2017 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26710 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26710-submit@debbugs.gnu.org id=B26710.149357810625221 (code B ref 26710); Sun, 30 Apr 2017 18:49:02 +0000 Original-Received: (at 26710) by debbugs.gnu.org; 30 Apr 2017 18:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:48038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4ttS-0006Yi-BU for submit@debbugs.gnu.org; Sun, 30 Apr 2017 14:48:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4ttO-0006YV-Nm for 26710@debbugs.gnu.org; Sun, 30 Apr 2017 14:48:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4ttE-0003lV-VG for 26710@debbugs.gnu.org; Sun, 30 Apr 2017 14:48:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4tt4-0003jH-IP; Sun, 30 Apr 2017 14:48:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2516 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d4tt3-00029g-ER; Sun, 30 Apr 2017 14:48:02 -0400 In-reply-to: <3d76a3ac-32ad-412d-349d-5904fc964a2b@yandex.ru> (message from Dmitry Gutov on Sun, 30 Apr 2017 13:35:53 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132135 Archived-At: > Cc: 26710@debbugs.gnu.org, control@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 30 Apr 2017 13:35:53 +0300 > > > When the search is in progress, I'm unable to use emacs. > > Emacs doesn't respond to any action until the search is over. > > OK, that's a reasonable complaint, especially when the search term is a > rarely occurring one (so most of the time is spent in the external process). > > It is non-trivial to fix, however, while keeping the xref backend API > and associated code sane. > > I'm hoping that the newly-added concurrency support can help us in that. > I have not looked into actually using it, though. > > If someone (Eli?) would like to try their hand at it, or to even outline > the basic direction such solution would use, that would be welcome. I'll try to look at this. According to my profiling, the lion's share of time is taken by xref--collect-matches, so that's the place to try concurrency. > - Being able to hook up in an asynchronous fashion to that sequence in a > (second?) background thread, to render the search results in the xref > buffer as soon as they appear. For the other thread to be background, it will need to yield from time to time, otherwise the user experience will be identical to what we have today, because an un-yielding thread will hold the execution unit until it does its job completely, and no other thread gets to run until it does.