all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 31853@debbugs.gnu.org
Subject: bug#31853: 27.0.50; binding case-fold-search is slow when there are many buffers
Date: Sat, 16 Jun 2018 07:54:46 -0700	[thread overview]
Message-ID: <CAHyO48yxkHA=XzJ12fxGsp0AWqpHdgZCBE=qDuLkcFZhe3HOyQ@mail.gmail.com> (raw)
In-Reply-To: <837emz1829.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Sat, Jun 16, 2018 at 12:53 AM Eli Zaretskii <eliz@gnu.org> wrote:
> In https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18522#201 I proposed
> a change to set-default that would use FOR_EACH_LIVE_BUFFER.  Could
> you see if that change helps in your case?

So far so good. I'll try it out for a few more days and see if it
stays fast. The patch I'm trying is attached if anyone else wants to
give it a go or check to ensure I didn't do something wrong in it.

[-- Attachment #2: 0001-Test.patch --]
[-- Type: application/octet-stream, Size: 905 bytes --]

From 6b1884635a4bac85fe2a9a04d685cc80dc84a909 Mon Sep 17 00:00:00 2001
From: Aaron Jensen <aaronjensen@gmail.com>
Date: Sat, 16 Jun 2018 01:13:21 -0700
Subject: [PATCH] Test

---
 src/data.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/data.c b/src/data.c
index 49c3dd834b..1133dc02da 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1710,11 +1710,12 @@ set_default_internal (Lisp_Object symbol, Lisp_Object value,
 	       set it in the buffers that don't nominally have a local value.  */
 	    if (idx > 0)
 	      {
+                Lisp_Object tail, buf;
 		struct buffer *b;
 
-		FOR_EACH_BUFFER (b)
-		  if (!PER_BUFFER_VALUE_P (b, idx))
-		    set_per_buffer_value (b, offset, value);
+		FOR_EACH_LIVE_BUFFER (tail, buf)
+		  if (!PER_BUFFER_VALUE_P (XBUFFER (buf), idx))
+		    set_per_buffer_value (XBUFFER (buf), offset, value);
 	      }
 	  }
 	else
-- 
2.17.1


  reply	other threads:[~2018-06-16 14:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16  1:42 bug#31853: 27.0.50; binding case-fold-search is slow when there are many buffers Aaron Jensen
2018-06-16  2:10 ` bug#31853: (27.0.50; binding case-fold-search is slow when there are many buffers) Aaron Jensen
2018-06-16  6:51   ` bug#31853: 27.0.50; binding case-fold-search is slow when there are many buffers Eli Zaretskii
2018-06-30 13:18   ` bug#31853: (27.0.50; binding case-fold-search is slow when there are many buffers) Stefan Monnier
2018-06-30 13:53     ` Eli Zaretskii
2018-06-16  2:17 ` bug#31853: 27.0.50; binding case-fold-search is slow when there are many buffers Noam Postavsky
2018-06-16  6:52   ` Eli Zaretskii
2018-06-16 13:51     ` Noam Postavsky
2018-06-16  6:45 ` Eli Zaretskii
2018-06-16  7:39   ` Aaron Jensen
2018-06-16  7:53     ` Eli Zaretskii
2018-06-16 14:54       ` Aaron Jensen [this message]
2018-06-17 12:37         ` Aaron Jensen
2018-06-17 13:11           ` Eli Zaretskii
2018-06-23  5:23             ` Aaron Jensen
2018-06-23  6:54               ` Eli Zaretskii
2018-06-30  8:19                 ` Eli Zaretskii
2018-06-30 18:22                   ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyO48yxkHA=XzJ12fxGsp0AWqpHdgZCBE=qDuLkcFZhe3HOyQ@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=31853@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.