Gnus development mailing list
 help / color / mirror / Atom feed
From: Hrvoje Niksic <hniksic@iskon.hr>
Subject: Re: Brian May's `Re: Bugs in PGnus' article jams Gnus
Date: 07 Dec 1999 17:16:42 +0100	[thread overview]
Message-ID: <9t9g0xeafpx.fsf@mraz.iskon.hr> (raw)
In-Reply-To: Per Abrahamsen's message of "07 Dec 1999 17:01:28 +0100"

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> Laura Conrad <lconrad@gamesville.com> writes:
> 
> > I decided to upgrade to xemacs 21.1.8 last night, so I have tried this 
> > message on both versions.  It seems to hang 20.4 indefinitely (longer
> > than I wanted to wait), while 21.1.8 does indeed display eventually
> > (also longer than I WANTED to wait).
> 
> 20.4 finished here (250MHz SPARC) after 96 seconds.
> 
> Tue Dec  7 16:53:02 MET 1999
> Tue Dec  7 16:54:38 MET 1999

Let's see what XEmacs (21.2) spent time doing:

    Function Name                         Ticks    %/Total   Call Count
    ==================================    =====    =======   ==========
    generate-new-buffer-name              2303     45.876    6369
    (in garbage collection)               1662     33.108    
    get-buffer-create                     248      4.940     6976
    kill-buffer                           139      2.769     5763
    re-search-forward                     111      2.211     20685
    string-match                          63       1.255     45878
    put-char-table                        59       1.175     1822
    byte-code                             58       1.155     14892
    expand-file-name                      46       0.916     6072
    ietf-drums-token-to-list              30       0.598     3642
    ...
    -------------------------------------------------------------------
    Total                                 5020     100.00


    One tick = 1 ms

So all the time was spent in generate-new-buffer-name.  How weird!

The message has about 600 parts (why it was created so is a different
anomaly.)  The mm code in turn created several hundreds of buffers,
all using generate-new-buffer-name.  The algorithm of
generate-new-buffer-name is:

  count = 1;
  while (1)
    {
      sprintf (number, "<%d>", ++count);
      gentemp = concat2 (name, build_string (number));
      if (!NILP (ignore))
        {
          tem = Fstring_equal (gentemp, ignore);
          if (!NILP (tem))
            return gentemp;
        }
      tem = Fget_buffer (gentemp);
      if (NILP (tem))
	return gentemp;
    }

So, the more buffers you create, the more time it takes.  For the
number of parts here, it corresponds to tens of thousands of passes
through the above loop: and each pass actually conses up a string!

I think that's the source of the immense slowness.  I'll try to fix
it.


  reply	other threads:[~1999-12-07 16:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-07 13:38 Hannu Koivisto
1999-12-07 13:52 ` Gunnar Evermann
1999-12-07 14:06   ` Stein Arild Stromme
1999-12-07 14:21   ` Hannu Koivisto
1999-12-07 15:23     ` Laura Conrad
1999-12-07 16:01       ` Per Abrahamsen
1999-12-07 16:16         ` Hrvoje Niksic [this message]
1999-12-07 17:09 ` Shenghuo ZHU
1999-12-07 17:45   ` Shenghuo ZHU
1999-12-07 18:18     ` Hannu Koivisto
1999-12-07 18:22       ` Hrvoje Niksic
1999-12-07 18:57         ` Shenghuo ZHU
1999-12-07 19:21         ` Hannu Koivisto
1999-12-07 18:35     ` Toby Speight
1999-12-07 19:02       ` Shenghuo ZHU
1999-12-07 20:01         ` Jan Vroonhof
1999-12-08  9:18           ` Hrvoje Niksic
1999-12-09  0:46     ` Brian May
1999-12-09  1:11       ` Shenghuo ZHU
1999-12-09 13:37         ` Jan Vroonhof
1999-12-09 14:14           ` Per Abrahamsen
1999-12-09 15:46           ` Jan Vroonhof
     [not found]           ` <rj9034mcb2.fsf@zuse.dina.kvl.d <byr9gw2k2u.fsf@bolzano.math.ethz.ch>
1999-12-09 16:08             ` Per Abrahamsen
1999-12-09 19:18           ` Jan Vroonhof
1999-12-09 22:55             ` Shenghuo ZHU
1999-12-10  6:31               ` Lloyd Zusman
1999-12-10  6:42                 ` Shenghuo ZHU
     [not found]           ` <rj9034mcb2.fsf@zuse.dina.kvl.d <byr9gvrkh2.fsf@bolzano.math.ethz.ch>
1999-12-10  8:19             ` Hrvoje Niksic
1999-12-10  9:24             ` References (was: Re: Brian May's `Re: Bugs in PGnus' article jams Gnus) Per Abrahamsen
1999-12-10  9:59               ` Hrvoje Niksic
1999-12-10 11:52                 ` Per Abrahamsen
1999-12-10 10:24           ` Brian May's `Re: Bugs in PGnus' article jams Gnus Jan Vroonhof
1999-12-10 10:58             ` Broken References (was: Brian May's `Re: Bugs in PGnus' ...) Toby Speight
     [not found]           ` <rj9034mcb2.fsf@zuse.dina.kvl.d <byso1b14bp.fsf@bolzano.math.ethz.ch>
1999-12-10 12:06             ` Brian May's `Re: Bugs in PGnus' article jams Gnus Per Abrahamsen
1999-12-10 14:27           ` Jan Vroonhof
1999-12-10  0:46         ` Kai Großjohann
1999-12-10  3:55           ` Aaron M. Ucko

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=9t9g0xeafpx.fsf@mraz.iskon.hr \
    --to=hniksic@iskon.hr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).