From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 05:25:56 2021 Received: (at submit) by debbugs.gnu.org; 22 May 2021 09:25:56 +0000 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 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 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 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 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) 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) From: Augusto Stoffel To: bug-gnu-emacs@gnu.org Subject: 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 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 05:44:48 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 09:44:48 +0000 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 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 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 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 Date: Sat, 22 May 2021 12:44:36 +0300 Message-Id: <83eedzksqj.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel In-Reply-To: <87k0nr9l2f.fsf@gmail.com> (message from Augusto Stoffel on Sat, 22 May 2021 11:25:44 +0200) Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 06:49:27 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 10:49:27 +0000 Received: from localhost ([127.0.0.1]:38365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkPCB-0000iI-9P for submit@debbugs.gnu.org; Sat, 22 May 2021 06:49:27 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:35478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkPC9-0000i2-0Z for 48581@debbugs.gnu.org; Sat, 22 May 2021 06:49:25 -0400 Received: by mail-ed1-f50.google.com with SMTP id y7so8682710eda.2 for <48581@debbugs.gnu.org>; Sat, 22 May 2021 03:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=niC5I1nQy34+fgNb0cvlPQ/fOA8oeo/p20Ownk+O9fg=; b=UnrNAeuF0A6RMQb4CMWS1OI2KJTV4O80DJs39tEt/AWXeWa1iG/TYz2CPZV86Uw34q ZnRstjIk4D+OCU7qBuF16EN1qlqnaIrMluMKkJa6P+/7qdsMG7cRNAavLt+gBzwiyg9J 5lZ+tY1gak/K9JRbxjX6m24l8z14PgOqOd0gZaJNiUgqSnkruzXZbbqfl5Ww9P1WIjZq aYCMLIA/LPujeLBS1q1WxBq1yAvRqb1v2Y0O35MXcDcLBMzk0RLw+k4oQlqkAmcQpNzd M5WmvG2dexCB4G1Pp8gzQDVhXGet8JYvWXc0dpUA+sSkQYRr7GF3Xr31X1A7GJAvryHZ CgPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=niC5I1nQy34+fgNb0cvlPQ/fOA8oeo/p20Ownk+O9fg=; b=ZqPIvRpEkLmA8kzWGPkWV+BMTcPmpg+9l8IB0CzgkU879bmhkkvJq+m47dNEFRnHfD DxKJ1bTCi5oogFKs7S76EN32XY0hF/VUHJuvfpvE0EztiVXpo6bcEA5qUiMHnxh/uq4/ Z8zGBd7QXITwU0G2PQAzk+VL6Aya75JxuGfr6A6JB+1VQGfJFSV+gF0VfI+Uy9J/CuC2 Itg8U9bUnyEHAgDGjT69zDBtsLDeympMlEef+uxQNZZtnsap8rWVH6dbh3I8b+uHEwka QRoUtdxK+aL9uAHg42/+S24Eo441N4hJy+yDhdGPXrT844zrgGDGQhZiOMgvppTfB3D0 Vz+Q== X-Gm-Message-State: AOAM533UhSsKa1zYFi6Bx8gCo5oIze0r435dLYMaqcV2BDxX1KKfZg5S 5RxXdewJ1SvxHLEq38rQVAXjD71OdhFHow== X-Google-Smtp-Source: ABdhPJxVzFAK39YivqaeiIfybhJmEZSB+AkvbJUu2dHrv6a3YsVztEMkXuXo3tEFVhhYUYunmvk9PA== X-Received: by 2002:a50:d69c:: with SMTP id r28mr15696128edi.64.1621680558842; Sat, 22 May 2021 03:49:18 -0700 (PDT) Received: from ars3 ([2a02:908:2211:8540::66]) by smtp.gmail.com with ESMTPSA id t17sm5687698edd.14.2021.05.22.03.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 May 2021 03:49:18 -0700 (PDT) From: Augusto Stoffel To: Eli Zaretskii Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> Date: Sat, 22 May 2021 12:49:16 +0200 In-Reply-To: <83eedzksqj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 May 2021 12:44:36 +0300") Message-ID: <87eedzujpv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 22 May 2021 at 12:44, Eli Zaretskii wrote: >> 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, No, the main purpose of Isearch is to search for a string :-). `isearch-lazy-highlight-buffer-update' has more than one purpose, but I assume that finishing faster is always better than taking longer than necessary. > and (b) that a case with 15,000 matches is the common one? No, that was just so I that the measured time is not too small. However, the delay before the lazy count appears in the echo area during day-to-day Isearch operation is noticeable to the naked eye. If you keep looking, you will notice it. Note that the precise value of this parameter is irrelevant, only the order of magnitude plays a significant role. I don't think there's a need to do a more formal benchmark to conclude 20 is to small and 2000 is probably too big. > >> 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, A decent but not particularly powerful laptop from 2019. > and how many milliseconds does it take Emacs to highlight 20 vs 200 > matches? I didn't specifically compute that, but you can get an upper bound based on the provided data: 2 ms for 20 matches and 6.7 ms for 200 matches. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 07:08:20 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 11:08:20 +0000 Received: from localhost ([127.0.0.1]:38373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkPUS-00019P-96 for submit@debbugs.gnu.org; Sat, 22 May 2021 07:08:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkPUQ-00019B-00 for 48581@debbugs.gnu.org; Sat, 22 May 2021 07:08:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57206) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkPUK-0003rn-S2; Sat, 22 May 2021 07:08:12 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1646 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 1lkPUK-0003uJ-AO; Sat, 22 May 2021 07:08:12 -0400 Date: Sat, 22 May 2021 14:08:11 +0300 Message-Id: <838s47kov8.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel In-Reply-To: <87eedzujpv.fsf@gmail.com> (message from Augusto Stoffel on Sat, 22 May 2021 12:49:16 +0200) Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> <87eedzujpv.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Augusto Stoffel > Cc: 48581@debbugs.gnu.org > Date: Sat, 22 May 2021 12:49:16 +0200 > > > You assume that (a) the main purpose of Isearch is to count the > > matches, > > No, the main purpose of Isearch is to search for a string :-). > `isearch-lazy-highlight-buffer-update' has more than one purpose, but I > assume that finishing faster is always better than taking longer than > necessary. In most real-life cases, at least in mine, you never need to look at all the matches, only at the first few. > However, the delay before the lazy count appears in the echo area during > day-to-day Isearch operation is noticeable to the naked eye. If you > keep looking, you will notice it. I know it's noticeable, and that directly contradicts your time estimations, because human eyes cannot notice such short delays. In general, anything shorter than 50 ms will look instantaneous to us, at least IME. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 08:17:38 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 12:17:38 +0000 Received: from localhost ([127.0.0.1]:38448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQZV-00050q-Sy for submit@debbugs.gnu.org; Sat, 22 May 2021 08:17:38 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:42647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQZT-00050a-Fu for 48581@debbugs.gnu.org; Sat, 22 May 2021 08:17:36 -0400 Received: by mail-ed1-f52.google.com with SMTP id i13so26400041edb.9 for <48581@debbugs.gnu.org>; Sat, 22 May 2021 05:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7Wm5iCE4ri9pR28ISSfd+/ejw8mYj1ZK/isqEd6QGI0=; b=HMHKU5oTBOBxWE9Yn+Xdjz2VoLi7FdKjQjefcM+uXlrOyTi6PRnepVFnIBTwNWBvCc 3oNViwu+t3ZlT7J43POaNUSB9rcMnQV3XqTV6mxhPaFtBaDrGqKU7R2ExGs2aIbm0LS9 f+8hfFXjcOH6tqZt0KiUvLJUY3IMkLt7jR3ujl3bWUSxmP9oDZqut2B0UTIXybH1UsTo OUvdjHuK1rzr0AJQLC38E+3WbZRQRgTdhBp+pZMPMj4X5EN6b4dIWupdOV7b3N5E0C6m vo7oP41NryKM9DmP48Ky2tooVE9NwLHJK2hxwJPfzz8wSW834GpIsf6yzNTGmbu5cVij qzMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7Wm5iCE4ri9pR28ISSfd+/ejw8mYj1ZK/isqEd6QGI0=; b=njR9XA6ql90Gv8a1z8TQmuZG1UScmMPiGTdBwnhUKI3bWX1uAw3/hhrNcvZwSnp4qK iBZu4vvj465tb1LMEQFP0UNP7xj50N3FzLFOCoPlwDdG/dhm3dxrSoHetUipcNDZAC2V ZAP/e/vYwzclXb2TUJ7E85vjwnUSAy0IZ1U/XBqPJuta1VjRstgl++A/IhP/9SiRzvud wrbmLH68Wvmjr/l7t8htV5dpn+/ybqHgP6IIJ7qoEZhZzP84rdESpKECTY6zxMRmTBWu NsvY9f8DVmwMWv4A6imfZ2B0ERLwUqTSgXezOHEz8Ak67A/YThwHCsEhyJNjNbn0yRdN y0Dw== X-Gm-Message-State: AOAM531QrnGAHvRMzSoQCk4Jrge4CdwdOGdGovMS3henRs8cr5Akm9Sk piqsSnqb/9x7UDfqhG5mT3pbgxOp6bJhPw== X-Google-Smtp-Source: ABdhPJzZDrYAPzJRUhGXMplMnYcTmLB753oUKfFGv70xYBBoL5s6+KSfTzbtiHm2rxOHFHMfefX/1w== X-Received: by 2002:a05:6402:26d1:: with SMTP id x17mr16055865edd.14.1621685849169; Sat, 22 May 2021 05:17:29 -0700 (PDT) Received: from ars3 ([2a02:908:2211:8540::66]) by smtp.gmail.com with ESMTPSA id y10sm5320879ejh.105.2021.05.22.05.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 May 2021 05:17:28 -0700 (PDT) From: Augusto Stoffel To: Eli Zaretskii Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> <87eedzujpv.fsf@gmail.com> <838s47kov8.fsf@gnu.org> Date: Sat, 22 May 2021 14:17:25 +0200 In-Reply-To: <838s47kov8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 May 2021 14:08:11 +0300") Message-ID: <87k0nrklnu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 22 May 2021 at 14:08, Eli Zaretskii wrote: > In most real-life cases, at least in mine, you never need to look at > all the matches, only at the first few. That's right. However, despite the name, `lazy-highlight-buffer-max-at-a-time' also influences the time needed to compute the number of matches in the buffer. So, when you set `isearch-lazy-count' to t, those numbers in the table of my first message indicate the delay between typing a search string and seeing the number of matches in the buffer (as well as the relative position of the current match) in the echo area. Perhaps you don't use `isearch-lazy-count', but if you do, you must have noticed it's often a bit slow to update. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 08:31:04 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 12:31:04 +0000 Received: from localhost ([127.0.0.1]:38474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQmW-0006IU-2t for submit@debbugs.gnu.org; Sat, 22 May 2021 08:31:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQmU-0006C2-6D for 48581@debbugs.gnu.org; Sat, 22 May 2021 08:31:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58666) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkQmP-0007hC-01; Sat, 22 May 2021 08:30:57 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2734 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 1lkQmO-0005sE-GZ; Sat, 22 May 2021 08:30:56 -0400 Date: Sat, 22 May 2021 15:30:58 +0300 Message-Id: <8335ufkl19.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel In-Reply-To: <87k0nrklnu.fsf@gmail.com> (message from Augusto Stoffel on Sat, 22 May 2021 14:17:25 +0200) Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> <87eedzujpv.fsf@gmail.com> <838s47kov8.fsf@gnu.org> <87k0nrklnu.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Augusto Stoffel > Cc: 48581@debbugs.gnu.org > Date: Sat, 22 May 2021 14:17:25 +0200 > > On Sat, 22 May 2021 at 14:08, Eli Zaretskii wrote: > > > In most real-life cases, at least in mine, you never need to look at > > all the matches, only at the first few. > > That's right. However, despite the name, > `lazy-highlight-buffer-max-at-a-time' also influences the time needed to > compute the number of matches in the buffer. So, when you set > `isearch-lazy-count' to t, those numbers in the table of my first > message indicate the delay between typing a search string and seeing the > number of matches in the buffer (as well as the relative position of the > current match) in the echo area. That was exactly my point: the variable you suggest changing affects more than just one use case, and it affects them in ways that in a sense contradict one another. If we want to change the default value, we should find a way of doing that without hurting "the other" use case. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 09:14:29 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 13:14:29 +0000 Received: from localhost ([127.0.0.1]:38542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkRSX-0000OO-8k for submit@debbugs.gnu.org; Sat, 22 May 2021 09:14:29 -0400 Received: from mail-ed1-f53.google.com ([209.85.208.53]:36507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkRST-0000O8-8c for 48581@debbugs.gnu.org; Sat, 22 May 2021 09:14:28 -0400 Received: by mail-ed1-f53.google.com with SMTP id df21so26507307edb.3 for <48581@debbugs.gnu.org>; Sat, 22 May 2021 06:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=D37vUn/Q9pHTq4yrmd705yIPJqATxruN82dnqg3fMuY=; b=TIrvyR4+7idp/RE2WMg8MgmcdKsKshn42o+b9Y+g+UwDfJny0+eHOnjhl40nqLzW7Z Hz8TOkceriKs3LgU6w/HZLS1zpHrHv0k1loWPIvbR7e1/bsmICgpqCrRgWjjNv3aQshL 9a8HmsDAiyu0CbWz8uBjlnPP1C4U6FjKudgngOYYIN6jQsTtKbPegnTtxG6WnMIgy572 7WkKnZKoBHSwQM1C03mBeg76BLhj0k6w00vgFYYNW7yD11mJVlP967k6KgvII3TTfLPD 1O2lb75sGhUcfc8FWb/Yw1E5yCJ2PUGkRoc954DWZ/sc2ZExUywqSDg7j0LoBBmRHGKK jwkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=D37vUn/Q9pHTq4yrmd705yIPJqATxruN82dnqg3fMuY=; b=movxGCuZjF0OsDNiZ4xNCqYR08ehBQ3BmWRfB98ZT3YBBwBOvmMvbQMVRJvwFuTpeY KX2Ea/zT1kyLP+8RpZF62yY/vBlUBgvPyg+fv0nzqgKwuUFmhqbfN+K5+6W6tgvyXwlD nZmUi7ybzgTkR1WKdQupE+WC8VeJ+wwDq3iRmSx0PGjPiUTsTUawvdLJhYcYMe2Bmiqu DXHTa/nZqEdwgJ3+pE/3Ej/Ux3a0dOSDoXmZlZzHfobLYKT5u5HcLEvkMN3dmdbVyAsO gwy3Gk/M857mdPylaDMbk3WqY/vA5MNL7FVMKSbd/qa+iA+zi7c67aK+4+n0VTYcIS6X O5Zw== X-Gm-Message-State: AOAM531s1rxCdB6pvrIKRNO13eonn8xBCjLuqozmwQfkN3j4CVQulRRX VVWxI5y136/1JVHUddogJRgzuPiIW2g= X-Google-Smtp-Source: ABdhPJzoUmpFNrKixY1LNkVtGeVrPWsQd0LZs+Da9/+F8Y0+AnNyldhAPBC/jO7dFuXca+j7SLhjcA== X-Received: by 2002:aa7:dd10:: with SMTP id i16mr16357425edv.274.1621689258991; Sat, 22 May 2021 06:14:18 -0700 (PDT) Received: from ars3 ([2a02:908:2211:8540::66]) by smtp.gmail.com with ESMTPSA id bo25sm6376852edb.67.2021.05.22.06.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 May 2021 06:14:18 -0700 (PDT) From: Augusto Stoffel To: Eli Zaretskii Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> <87eedzujpv.fsf@gmail.com> <838s47kov8.fsf@gnu.org> <87k0nrklnu.fsf@gmail.com> <8335ufkl19.fsf@gnu.org> Date: Sat, 22 May 2021 15:14:16 +0200 In-Reply-To: <8335ufkl19.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 May 2021 15:30:58 +0300") Message-ID: <87k0nqsyfr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 22 May 2021 at 15:30, Eli Zaretskii wrote: > That was exactly my point: the variable you suggest changing affects > more than just one use case, and it affects them in ways that in a > sense contradict one another. > > If we want to change the default value, we should find a way of doing > that without hurting "the other" use case. What are the other uses cases, and in which way could they be hurt by `isearch-lazy-highlight-buffer-update' being faster to finish? Earlier you mentioned highlighting the visible matches. Note that this is controlled by a different variable, namely `lazy-highlight-max-at-a-time' (which, not long ago, was also changed from its old default of 20, albeit for a different reason). From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 09:35:32 2021 Received: (at 48581) by debbugs.gnu.org; 22 May 2021 13:35:32 +0000 Received: from localhost ([127.0.0.1]:38563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkRmu-0000sf-7g for submit@debbugs.gnu.org; Sat, 22 May 2021 09:35:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkRmr-0000sS-7s for 48581@debbugs.gnu.org; Sat, 22 May 2021 09:35:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59540) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkRml-0004YG-IY; Sat, 22 May 2021 09:35:24 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2718 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 1lkRmk-0002t8-TU; Sat, 22 May 2021 09:35:23 -0400 Date: Sat, 22 May 2021 16:35:22 +0300 Message-Id: <83v97aki1x.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel In-Reply-To: <87k0nqsyfr.fsf@gmail.com> (message from Augusto Stoffel on Sat, 22 May 2021 15:14:16 +0200) Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low References: <87k0nr9l2f.fsf@gmail.com> <83eedzksqj.fsf@gnu.org> <87eedzujpv.fsf@gmail.com> <838s47kov8.fsf@gnu.org> <87k0nrklnu.fsf@gmail.com> <8335ufkl19.fsf@gnu.org> <87k0nqsyfr.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Augusto Stoffel > Cc: 48581@debbugs.gnu.org > Date: Sat, 22 May 2021 15:14:16 +0200 > > On Sat, 22 May 2021 at 15:30, Eli Zaretskii wrote: > > > That was exactly my point: the variable you suggest changing affects > > more than just one use case, and it affects them in ways that in a > > sense contradict one another. > > > > If we want to change the default value, we should find a way of doing > > that without hurting "the other" use case. > > What are the other uses cases, and in which way could they be hurt by > `isearch-lazy-highlight-buffer-update' being faster to finish? The most obvious case is to find the first match and act on that. Highlighting too many other matches will delay the response to the next command. From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 16:38:47 2021 Received: (at 48581) by debbugs.gnu.org; 25 May 2021 20:38:47 +0000 Received: from localhost ([127.0.0.1]:47129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lldp8-0008FQ-TK for submit@debbugs.gnu.org; Tue, 25 May 2021 16:38:47 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:43475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lldp5-0008Eq-T6 for 48581@debbugs.gnu.org; Tue, 25 May 2021 16:38:44 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B366360002; Tue, 25 May 2021 20:38:36 +0000 (UTC) From: Juri Linkov To: Augusto Stoffel Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low Organization: LINKOV.NET References: <87k0nr9l2f.fsf@gmail.com> Date: Tue, 25 May 2021 23:29:56 +0300 In-Reply-To: <87k0nr9l2f.fsf@gmail.com> (Augusto Stoffel's message of "Sat, 22 May 2021 11:25:44 +0200") Message-ID: <87zgwi64jn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. Thanks for the suggestion. I tried to change it to 200, I got such times: lazy-highlight-buffer-max-at-a-time | time to finish counting 20 (current setting) | 7 s 200 | 2 s I hope this change will be a big improvement for everyone, because users will lose less time waiting it to finish, while keeping isearch still responsive. From debbugs-submit-bounces@debbugs.gnu.org Mon May 31 16:33:52 2021 Received: (at 48581) by debbugs.gnu.org; 31 May 2021 20:33:52 +0000 Received: from localhost ([127.0.0.1]:34988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnobg-00071V-E2 for submit@debbugs.gnu.org; Mon, 31 May 2021 16:33:52 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnobe-00071E-B3; Mon, 31 May 2021 16:33:50 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id B1A9B1BF203; Mon, 31 May 2021 20:33:42 +0000 (UTC) From: Juri Linkov To: Augusto Stoffel Subject: Re: bug#48581: 27.2; Default value of lazy-highlight-buffer-max-at-a-time is too low Organization: LINKOV.NET References: <87k0nr9l2f.fsf@gmail.com> <87zgwi64jn.fsf@mail.linkov.net> Date: Mon, 31 May 2021 23:33:13 +0300 In-Reply-To: <87zgwi64jn.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 25 May 2021 23:29:56 +0300") Message-ID: <87wnreiqye.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48581 Cc: 48581@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 48581 fixed close 48581 28.0.50 thanks >> 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. > > Thanks for the suggestion. I tried to change it to 200, I got such times: > > lazy-highlight-buffer-max-at-a-time | time to finish counting > 20 (current setting) | 7 s > 200 | 2 s > > I hope this change will be a big improvement for everyone, > because users will lose less time waiting it to finish, > while keeping isearch still responsive. Now tenfold increase was pushed to master. From unknown Sat Jun 21 03:28:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 29 Jun 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator