GNU bug report logs -
#18522
occasional slow performance in some Gnus code
Previous Next
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
Message #180 received at 18522 <at> debbugs.gnu.org (full text, mbox):
> From: Peter Münster <pmlists <at> free.fr>
> Cc: rudalics <at> gmx.at, larsi <at> gnus.org, 18522 <at> debbugs.gnu.org
> Date: Wed, 24 Feb 2016 21:03:41 +0100
>
> --8<---------------cut here---------------start------------->8---
> │ /* If this variable is not always local in all buffers,
> │ set it in the buffers that don't nominally have a local value. */
> │ if (idx > 0)
> │ ↑ jle 95
> │ {
> │ struct buffer *b;
> │ int i = 0;
> │ FOR_EACH_BUFFER (b)
> 0.08 │ mov all_buffers,%rcx
> │ test %rcx,%rcx
> │ ↓ je 180
> │ {
> │ i++;
> │ if (!PER_BUFFER_VALUE_P (b, idx))
> 0.02 │ cmp last_per_buffer_idx,%edx
> │ ↓ jge 160
> │ {
> │ struct buffer *b;
> │ int i = 0;
> │ FOR_EACH_BUFFER (b)
> │ {
> │ i++;
> │ mov $0x1,%edx
> 0.02 │ ↓ jmp f3
> │ nop
> 15.24 │ f0: add $0x1,%edx
> │ if (!PER_BUFFER_VALUE_P (b, idx))
> 14.02 │ f3: cmpb $0x0,0x320(%rcx,%rax,1)
> 10.65 │ ↓ jne 101
> │ set_per_buffer_value():
> │ }
> │
> │ INLINE void
> │ set_per_buffer_value (struct buffer *b, int offset, Lisp_Object value)
> │ {
> │ *(Lisp_Object *)(offset + (char *) b) = value;
> 14.11 │ mov %rbp,(%rcx,%rsi,1)
> │ Fset_default():
> │ set it in the buffers that don't nominally have a local value. */
> │ if (idx > 0)
> │ {
> │ struct buffer *b;
> │ int i = 0;
> │ FOR_EACH_BUFFER (b)
> 14.36 │101: mov 0x2d8(%rcx),%rcx
> 21.80 │ test %rcx,%rcx
> 5.16 │ ↑ jne f0
> │ {
> │ i++;
> │ if (!PER_BUFFER_VALUE_P (b, idx))
> │ set_per_buffer_value (b, offset, value);
> │ }
> │ fprintf(stderr, "XXXXX: %d\n", i);
> 0.00 │10d: mov stderr@@GLIBC_2.2.5,%rdi
> 2.18 │ mov $0x5e90e5,%esi
> │ xor %eax,%eax
> │ → callq fprintf <at> plt
> │ ↑ jmpq 95
> │ nop
> --8<---------------cut here---------------end--------------->8---
Most of the time is spent in the loop over the buffers.
So I guess avoiding binding case-fold-search in parse-time-string
should make the problem go away?
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.