GNU bug report logs - #18522
occasional slow performance in some Gnus code

Previous Next

Packages: emacs, gnus;

Reported by: Peter Münster <pmlists <at> free.fr>

Date: Mon, 22 Sep 2014 10:38:02 UTC

Severity: normal

Tags: fixed

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Peter Münster <pmlists <at> free.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, larsi <at> gnus.org, 18522 <at> debbugs.gnu.org
Subject: bug#18522: 24.4.50; mapcar is very slow
Date: Tue, 23 Feb 2016 12:19:30 +0100
On Mon, Feb 22 2016, Eli Zaretskii wrote:

> So now the question becomes: which part of Fset_default?  I thought it
> was the loop over all the buffers, but your session seems to say it
> couldn't be.

Why?

This is what I read in buffer.h:

--8<---------------cut here---------------start------------->8---
/* Chain of all buffers, including killed ones.  */

extern struct buffer *all_buffers;

/* Used to iterate over the chain above.  */

#define FOR_EACH_BUFFER(b) \
  for ((b) = all_buffers; (b); (b) = (b)->next)
--8<---------------cut here---------------end--------------->8---

"including killed ones" !

That means, the chain gets bigger and bigger, whenever I read an article
or I reply or I send a new message or whatever.

I've added a small patch to Fset_default:

--8<---------------cut here---------------start------------->8---
		struct buffer *b;
                int i = 0;
		FOR_EACH_BUFFER (b) {
                  i++;
		  if (!PER_BUFFER_VALUE_P (b, idx))
		    set_per_buffer_value (b, offset, value);
                }
                fprintf(stderr, "length of all_buffers: %d\n", i);
--8<---------------cut here---------------end--------------->8---

Let's see, how the chain grows... (or not)

-- 
           Peter




This bug report was last modified 8 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.