Gnus development mailing list
 help / color / mirror / Atom feed
From: Sean Doran <smd@ebone.net>
Subject: Re: opening speed for nnml groups
Date: 04 Sep 1997 16:55:01 +0200	[thread overview]
Message-ID: <52afhti0xm.fsf@sean.ebone.net> (raw)
In-Reply-To: Lars Balker Rasmussen's message of "03 Sep 1997 17:01:26 +0200"

Lars Balker Rasmussen <lbr@mjolner.dk> writes:

> % mkdir test
> % perl -e 'foreach $a (1..10000) { open FOO, ">test/$a" }'
> % time rm -rf test
> 0.60u 11.18s 1:55.40 10.2%
> % uname -a
> SunOS heimdal 5.5.1 Generic_103640-08 sun4u sparc

Ich, perl is a pig.  This makes me feel good about my
choice for a scripting shell:

 : sean.ebone.net ; uname -a        
NetBSD sean.ebone.net 1.2G NetBSD 1.2G (EBONE) #0: Sun Aug 17 20:19:52 CEST 1997     smd@sean.ebone.net:/usr/src/sys/arch/i386/compile/EBONE i386
: sean.ebone.net ; scsh
Scsh 0.5
> (create-directory "test")
> (run (time scsh -c 
	"(let loop ((i 1))
		(close-output-port 
		 (open-output-file (string-append \"test/\"
				    (number->string i))))
		(if (< i 10001) 
		    (loop (+ i 1))))"))
      175.68 real         6.71 user        68.59 sys
> (run (time rm -rf test))
       94.45 real         0.12 user         3.38 sys
> (create-directory "test")
> (run (time perl -e "foreach $a (1..10000) { open FOO, \">test/$a\" }"))
      198.90 real	  5.81 user	   68.99 sys
> (run (time scsh -c "(begin (for-each (lambda (f)
                                        (delete-file f))
                                       (glob \"./test/*\"))
			     (delete-directory \"test\"))"))
       89.79 real         7.71 user         7.83 sys

Well I cheat in that I use a statically-linked scshvm,
which makes an impressive difference. :)

> ls is primarily slow because it has to sort the files.

Yes, quite likely.  The globbing is certainly the most
CPU-intensive part of the quick rm equivalent.

> But of course, the Unix filesystem gets slower as more files are in a
> directory, but it's not _that_ bad.

Ayup.  I can't see any reason to blame the filesystem for 
nnml's slow behaviour on large groups.   The obvious CPU
eaters are mostly in preparing the *Summary* buffer, 
in the work done upon exiting the group, and in anything
else that does significant marching through and manipulation of
the *Summary* buffer.

Copying, respooling or moving articles also has ugly time
consumption properties having to do with maintaining
.overview files.

	Sean.


  parent reply	other threads:[~1997-09-04 14:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-02 12:01 Steinar Bang
1997-09-03 13:05 ` Steve Folkes
1997-09-03 15:01   ` Lars Balker Rasmussen
1997-09-03 19:45     ` Mark Eichin
1997-09-03 21:26     ` Russ Allbery
1997-09-04 14:55     ` Sean Doran [this message]
1997-09-04 15:39       ` Lars Balker Rasmussen
1997-09-04 21:44         ` Colin Rafferty
1997-09-05 12:20           ` David S. Goldberg
1997-09-05 15:21             ` Edit MIME messages (was: Re: opening speed for nnml groups) Kai Grossjohann
1997-09-05 15:57               ` David S. Goldberg
1997-09-09  7:06                 ` Steinar Bang
1997-09-10  8:43             ` opening speed for nnml groups Lars Balker Rasmussen
1997-09-10 15:07               ` Colin Rafferty
1997-09-13 23:54               ` Lars Magne Ingebrigtsen
1997-09-03 20:33 ` Ken Raeburn

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=52afhti0xm.fsf@sean.ebone.net \
    --to=smd@ebone.net \
    /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).