From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low Date: Sat, 22 May 2021 12:44:36 +0300 Message-ID: <83eedzksqj.fsf@gnu.org> References: <87k0nr9l2f.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14374"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48581@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 11:45:31 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkOCH-0003ag-Pq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 11:45:29 +0200 Original-Received: from localhost ([::1]:34592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkOCG-0004X6-QO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 05:45:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkOBr-0004Wm-Qo for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkOBq-00084a-5L for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkOBq-0007RZ-2r for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:45: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: Sat, 22 May 2021 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48581 X-GNU-PR-Package: emacs Original-Received: via spool by 48581-submit@debbugs.gnu.org id=B48581.162167668828578 (code B ref 48581); Sat, 22 May 2021 09:45:02 +0000 Original-Received: (at 48581) by debbugs.gnu.org; 22 May 2021 09:44:48 +0000 Original-Received: from localhost ([127.0.0.1]:38333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkOBb-0007Qs-Px for submit@debbugs.gnu.org; Sat, 22 May 2021 05:44:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkOBZ-0007Qe-He for 48581@debbugs.gnu.org; Sat, 22 May 2021 05:44:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56216) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkOBR-0007uI-Rz; Sat, 22 May 2021 05:44:40 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4384 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkOBR-0007XM-El; Sat, 22 May 2021 05:44:37 -0400 In-Reply-To: <87k0nr9l2f.fsf@gmail.com> (message from Augusto Stoffel on Sat, 22 May 2021 11:25:44 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207021 Archived-At: > From: Augusto Stoffel > Date: Sat, 22 May 2021 11:25:44 +0200 > > The value of lazy-highlight-buffer-max-at-a-time determines how long > it takes to finish computing the isearch lazy count. The current > default value of 20 seems suboptimal. > > I made a simple experiment measuring the (real) time to count the > ~15000 matches of the string "e" in the file isearch.el, with the > following results: > > lazy-highlight-buffer-max-at-a-time | time to finish counting > 20 (current setting) | 1.5 s > 50 | 0.8 s > 100 | 0.6 s > 200 | 0.5 s > nil (do it all at once) | 0.4 s > > Based on this, I would like to suggest changing the default to 200, or > something in that order of magnitude. You assume that (a) the main purpose of Isearch is to count the matches, and (b) that a case with 15,000 matches is the common one? > The downside of this change would be an increase in the time Emacs is > unresponsive doing lazy counting/highlighting. However, this time > remains below a few milliseconds in a typical case What kind of CPU do you have there, and how many milliseconds does it take Emacs to highlight 20 vs 200 matches?