Gnus development mailing list
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
Cc: Jason Merrill <jason@redhat.com>
Subject: Small speedup PATCH to gnus-summary-insert-new-articles
Date: Fri, 19 Jul 2002 14:39:28 +0100	[thread overview]
Message-ID: <wvl1y9zn8fj.fsf@prospero.cambridge.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

In an earlier patch (2001-04-12) I added the nreverse below so that the
articles would be listed in the right order.  Shortly after sending that
patch, I realized that we might as well just build up the list in the right
order.

2001-11-04  Jason Merrill  <jason@redhat.com>

	* gnus-sum.el (gnus-summary-insert-new-articles): Count down to
	avoid nreverse.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1008 bytes --]

*** gnus-sum.el.~1~	Fri Jul 19 13:07:23 2002
--- gnus-sum.el	Fri Jul 19 13:05:41 2002
*************** If ALL is a number, fetch this number of
*** 11092,11104 ****
  	    i new)
  	(setq gnus-newsgroup-active
  	      (gnus-activate-group gnus-newsgroup-name 'scan))
! 	(setq i (1+ (cdr old-active)))
! 	(while (<= i (cdr gnus-newsgroup-active))
  	  (push i new)
! 	  (incf i))
  	(if (not new)
  	    (message "No gnus is bad news.")
- 	  (setq new (nreverse new))
  	  (gnus-summary-insert-articles new)
  	  (setq gnus-newsgroup-unreads
  		(gnus-sorted-nunion gnus-newsgroup-unreads new))
--- 11092,11103 ----
  	    i new)
  	(setq gnus-newsgroup-active
  	      (gnus-activate-group gnus-newsgroup-name 'scan))
! 	(setq i (cdr gnus-newsgroup-active))
! 	(while (> i (cdr old-active))
  	  (push i new)
! 	  (decf i))
  	(if (not new)
  	    (message "No gnus is bad news.")
  	  (gnus-summary-insert-articles new)
  	  (setq gnus-newsgroup-unreads
  		(gnus-sorted-nunion gnus-newsgroup-unreads new))

             reply	other threads:[~2002-07-19 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-19 13:39 Jason Merrill [this message]
2002-07-20 14:30 ` Kai Großjohann

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=wvl1y9zn8fj.fsf@prospero.cambridge.redhat.com \
    --to=jason@redhat.com \
    /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).