From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel 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 11:25:44 +0200 Message-ID: <87k0nr9l2f.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6214"; mail-complaints-to="usenet@ciao.gmane.io" To: 48581@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 11:26:15 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 1lkNte-0001W1-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 11:26:14 +0200 Original-Received: from localhost ([::1]:60428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkNtd-0001rq-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 05:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkNtW-0001ra-FO for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:26:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkNtW-0001s9-6z for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:26:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkNtT-000700-Se for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:26:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 09:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48581 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162167555626888 (code B ref -1); Sat, 22 May 2021 09:26:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 May 2021 09:25:56 +0000 Original-Received: from localhost ([127.0.0.1]:38326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkNtL-0006zb-G8 for submit@debbugs.gnu.org; Sat, 22 May 2021 05:25:56 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkNtJ-0006zS-8p for submit@debbugs.gnu.org; Sat, 22 May 2021 05:25:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkNtJ-0001r7-03 for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:25:53 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:40501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkNtH-0001lj-D3 for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 05:25:52 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id t3so26008679edc.7 for ; Sat, 22 May 2021 02:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=8K5CZ+c67YFcBJ8vl00BHsmy3LaIyfBJZ7Y0bZb/S/E=; b=YfS+FAPHxfxJrE7GFTdMsPUEsUKIdaW7pmYo87hNAzvkbufs6UOH17H14NHQFxO73o KEPgrG1n7n6HxE4XGvS1v7iUT+DpeSVBWEGoTmrPvUhVyIb43cJ8xSEHujS/prnMUwxE DsBMyGzHSNAJ/FTGIRoDzpz4ogR07FH1WkEkw4gn/q2j+YIYtUaK9t/XHDhIz4+l4NZ7 7bft+311Fdt1EQ5CWAw8uDiz+tHao7Br2v85FpZ13fO0oQL6yYPxQtTZ3f+GFvt4QETJ 4VQT6LK7BjsxIWK9s/cO6XtiiUoIw0s4B6xEDk325GErRGoKI08mgRLAx/PYw/BrDGzO 8nyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=8K5CZ+c67YFcBJ8vl00BHsmy3LaIyfBJZ7Y0bZb/S/E=; b=gt/k+Rn3RcbYUzDGgS7r5xQVUoH57zgxuZ/UbzF/xtvhm63XemNQpjLyYmnOkOCfov ssCgQQk4RdGmBNK+ixWLxmWCr8je2wobgBBBq+p3sMPFqCNgmVeKzN/JWDc9Jjfixd09 9gcSOPWyvgRxlvPvf9xjx1ySp4KskzgR29U3U5LAJcH+Uxh6Til7kAB4Qhw05q9KI+uW Qul24qD8TDH0sjEt2mUq8FX551KQVXRAA5r6hj2QWT2o5IziYhYXxrFiY7Kr+vgckbwY EL1oA90vp5BFkQbXWx6XckJguGFv9laYUh3NVPND3cDNsJevMcQsaPDvwJW9iwU+bI4c bxmw== X-Gm-Message-State: AOAM533vAgDteROQBUq2i1+zwi3x76gqcpRjb8ig8m4paffNqHrOlM1M QndMWWSeYOBb1jQp18G9nwcRihhEAxo= X-Google-Smtp-Source: ABdhPJyKlgnRcAI3Njhk6d75mMwSJbxO/TrSjX4nf+nTrF/ADwxEIpS825oJv555VRMtm0N+cxc+sQ== X-Received: by 2002:a50:9990:: with SMTP id m16mr15304553edb.292.1621675546469; Sat, 22 May 2021 02:25:46 -0700 (PDT) Original-Received: from ars3 ([2a02:908:2211:8540::66]) by smtp.gmail.com with ESMTPSA id e22sm6366644edu.35.2021.05.22.02.25.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 May 2021 02:25:46 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:207020 Archived-At: 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. 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, and on the other hand a sufficiently complex regexp on a sufficiently large buffer can hang isearch even with the current default settings.