Gnus development mailing list
 help / color / mirror / Atom feed
* Faster, lolcat.  Faster!
@ 2010-09-02  2:22 Lars Magne Ingebrigtsen
  2010-09-02  2:41 ` Ted Zlatanov
                   ` (7 more replies)
  0 siblings, 8 replies; 79+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-02  2:22 UTC (permalink / raw)
  To: ding

Now that Gnus is bug-free (because I haven't hacked much on Gnus the
past years) and has HTML support (because I have this week), I think
it's time to have a long good look at why `g' is so slow.

I mean, it's just querying some mail servers and some nntp servers.  I
though take less than a second, total, if you're not contacting half the
servers in the world.

Just to see where we were, I did a `g' and straced Emacs.

[larsi@quimbies ~/pgnus]$ grep stat /tmp/s2 | wc -l
5832
[larsi@quimbies ~/pgnus]$ grep open /tmp/s2 | wc -l
305

Right.  It stat()-et 5832 files.  5832 files!!1!  And opened and read
and wrote 305 files.  Geez.

So I think there should be room for improvement.

My plan is to do the following:

0) Remove almost all of my Gnus settings, so that I get the "default"
user experience.

1) General optimisations.  Instrument `file-exists-p' and friends and
see what's accessing all these files, and try to clamp down on that, as
well as doing general performance analysis and fixing up functions/areas
that are particularly slow.

2) Feature reduction.  If there are features that take a lot of time
when you do a `g', but don't give compelling results, then they should
default to "off".

3) Streaming.  I think many of the things that talk to servers over the
net can be more streaming than they are now.  I had a peek at pop3, just
to take an example, and I think I gleaned from it that it requests one
message, and then waits for it to arrive, and then requests the next,
etc.  If you just request all the articles, and then wait for them all
to arrive, it'll be oodles faster.  I think there's probably some
opportunities in that area, both for pop3, nntp and imap, as the obvious
candidates (although I haven't actually looked at the code for any of
these in depth).

4) Multi-threading.  This is the most difficult bit, but could yield
good results.  If you're requesting active files from two different nntp
servers, and getting mail, there's really no reason why those three
activities shouldn't happen at the same time.  Implementing asynchronous
things in Emacs is a pain, because you have to use process filters and
the like, but it seems to me (at 4:15, and I couldn't sleep) that it
should be possible to gather up the actions that can be async, launch
them all, wait for them all to finish, and then continue on with the
data that we've now gotten.  But this is a way, way bigger project than
the first three points here, so I'll tackle it last...  if ever...

So there you go.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2010-09-15 22:53 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02  2:22 Faster, lolcat. Faster! Lars Magne Ingebrigtsen
2010-09-02  2:41 ` Ted Zlatanov
2010-09-02  2:52   ` Lars Magne Ingebrigtsen
2010-09-02  4:48 ` Daniel Pittman
2010-09-02 14:26   ` Lars Magne Ingebrigtsen
2010-09-02 19:44   ` Russ Allbery
2010-09-02  5:20 ` David Engster
2010-09-02 14:15   ` Lars Magne Ingebrigtsen
2010-09-15 22:53   ` Tom Tromey
2010-09-02  7:29 ` Steinar Bang
2010-09-02 10:36 ` Ted Zlatanov
2010-09-02 11:10   ` Julien Danjou
2010-09-02 11:44     ` Frank Schmitt
2010-09-02 13:00       ` David Engster
2010-09-02 13:27         ` Ted Zlatanov
2010-09-02 14:23           ` Lars Magne Ingebrigtsen
2010-09-02 14:39             ` David Engster
2010-09-03 12:49               ` request-group-articles for nnimap (was: Faster, lolcat. Faster!) Ted Zlatanov
2010-09-03 18:10                 ` request-group-articles for nnimap David Engster
2010-09-03 18:27                   ` Lars Magne Ingebrigtsen
2010-09-07 15:45                   ` Ted Zlatanov
2010-09-02 14:17   ` Faster, lolcat. Faster! Lars Magne Ingebrigtsen
2010-09-03 12:44     ` Ted Zlatanov
2010-09-03 13:08       ` Lars Magne Ingebrigtsen
2010-09-02 11:13 ` Julien Danjou
2010-09-02 12:44   ` Ted Zlatanov
2010-09-02 13:04     ` Julien Danjou
2010-09-02 13:15       ` Adam Sjøgren
2010-09-02 13:23       ` Ted Zlatanov
2010-09-02 13:25       ` Steinar Bang
2010-09-02 17:10 ` James Cloos
2010-09-03 16:59   ` Lars Magne Ingebrigtsen
2010-09-02 22:33 ` Romain Francoise
2010-09-03 17:01   ` Lars Magne Ingebrigtsen
2010-09-04 17:20     ` Lars Magne Ingebrigtsen
2010-09-04 17:57       ` Lars Magne Ingebrigtsen
2010-09-04 18:31         ` Adam Sjøgren
2010-09-04 18:34           ` Lars Magne Ingebrigtsen
2010-09-04 18:45             ` Adam Sjøgren
2010-09-04 18:48               ` Adam Sjøgren
2010-09-04 18:53                 ` Lars Magne Ingebrigtsen
2010-09-04 21:30                   ` Lars Magne Ingebrigtsen
2010-09-04 21:36                     ` Lars Magne Ingebrigtsen
2010-09-04 21:57                       ` Lars Magne Ingebrigtsen
2010-09-04 22:45                         ` Lars Magne Ingebrigtsen
2010-09-04 22:50                           ` Lars Magne Ingebrigtsen
2010-09-04 23:03                             ` Adam Sjøgren
2010-09-05  0:19                               ` Lars Magne Ingebrigtsen
2010-09-05 11:58                                 ` Adam Sjøgren
2010-09-05  9:10                             ` Romain Francoise
2010-09-05  9:59                               ` Steinar Bang
2010-09-05  9:06                     ` Romain Francoise
2010-09-05 11:31                       ` Lars Magne Ingebrigtsen
2010-09-05 12:44                         ` Romain Francoise
2010-09-05 12:58                           ` Lars Magne Ingebrigtsen
2010-09-04 18:50               ` Adam Sjøgren
2010-09-04 19:31                 ` Adam Sjøgren
2010-09-04 19:49       ` Romain Francoise
2010-09-04 19:57         ` Lars Magne Ingebrigtsen
2010-09-04 20:08           ` Lars Magne Ingebrigtsen
2010-09-04 20:17             ` Lars Magne Ingebrigtsen
2010-09-04 22:01               ` James Cloos
2010-09-04 22:14                 ` Lars Magne Ingebrigtsen
2010-09-05 21:25                   ` James Cloos
2010-09-05 22:21                     ` Lars Magne Ingebrigtsen
2010-09-06 19:05                       ` James Cloos
2010-09-06 19:58                         ` Lars Magne Ingebrigtsen
2010-09-05 22:41                     ` Lars Magne Ingebrigtsen
2010-09-05 22:48                       ` Lars Magne Ingebrigtsen
2010-09-04 23:10                 ` Steinar Bang
2010-09-04 22:44               ` Romain Francoise
2010-09-04 22:47                 ` Lars Magne Ingebrigtsen
2010-09-04 20:12           ` Adam Sjøgren
2010-09-04 22:16           ` Romain Francoise
2010-09-04 23:00             ` Lars Magne Ingebrigtsen
2010-09-05  8:59               ` Romain Francoise
2010-09-05 11:29                 ` Lars Magne Ingebrigtsen
2010-09-04 22:37       ` Steinar Bang
2010-09-04 22:44         ` Lars Magne Ingebrigtsen

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).