unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: keramida@ceid.upatras.gr (Giorgos Keramidas)
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Katsumi Yamaoka <yamaoka@jpl.org>, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Emacs trunk and Gnus master are fully sync'd now
Date: Tue, 09 Jul 2013 22:41:51 +0200	[thread overview]
Message-ID: <67um8rbo6bpisw.fsf@saturn.laptop> (raw)
In-Reply-To: 874nc3o7ej.fsf@randomsample.de

On Tue, 09 Jul 2013 21:33:24 +0200, David Engster <deng@randomsample.de> wrote:
> Giorgos Keramidas writes:
>> So the unexist ranges *are* there.  But as you said the information
>> seems to be lost somewhere between the time `.newsrc.eld' loads and the
>> time Gnus queries the imap server for group state.
>
> Yes, and I found the problem. I could not reproduce this initially
> because it only exists in Emacs trunk, not in Gnus git. After I switched
> to Emacs trunk, I saw the same thing.
>
> It's actually really simple: The problem is `gnus-clean-old-newsrc',
> where 'unexist' marks will be removed when you upgrade from an older
> Gnus version, probably because the format has changed. However, in Emacs
> trunk, `gnus-newsrc-file-version' is "Gnus v5.13", which is always
> considered *smaller* than "Ma Gnus v0.03", so it will always remove the
> marks:
>
>     (when (or force
> 	      (< (gnus-continuum-version gnus-newsrc-file-version)
> 		 (gnus-continuum-version "Ma Gnus v0.03")))
>       ;; Remove old `exist' marks from old nnimap groups.
>
> So this has to be changed or maybe completely removed. I'm not sure; I
> guess it *could* happen that someone running Ma Gnus v0.02 upgrades to
> Gnus from Emacs 24.4.

Great!  Now we know at least why this is triggered.  Looking at the
diffs between emacs-24 and trunk of Emacs I can see that this function
indeed only exists in the trunk:

% 0709 21:49 gkeramidas@giorgos:~/git/emacs/lisp/gnus$ git diff emacs-24..trunk -- gnus-start.el
% [...]
% @@ -2291,7 +2301,27 @@ If FORCE is non-nil, the .newsrc file is read."
%           (gnus-message 5 "Reading %s...done" newsrc-file)))
%
%        ;; Convert old to new.
% -      (gnus-convert-old-newsrc))))
% +      (gnus-convert-old-newsrc)
% +      (gnus-clean-old-newsrc))))
% +
% +(defun gnus-clean-old-newsrc (&optional force)
% +  (when gnus-newsrc-file-version
% +    ;; Remove totally bogus `unexists' entries.  The name is
% +    ;; `unexist'.
% +    (dolist (info (cdr gnus-newsrc-alist))
% +      (let ((exist (assoc 'unexists (gnus-info-marks info))))
% +       (when exist
% +         (gnus-info-set-marks
% +          info (delete exist (gnus-info-marks info))))))
% +    (when (or force
% +             (< (gnus-continuum-version gnus-newsrc-file-version)
% +                (gnus-continuum-version "Ma Gnus v0.03")))
% +      ;; Remove old `exist' marks from old nnimap groups.
% +      (dolist (info (cdr gnus-newsrc-alist))
% +       (let ((exist (assoc 'unexist (gnus-info-marks info))))
% +         (when exist
% +           (gnus-info-set-marks
% +            info (delete exist (gnus-info-marks info)))))))))
%
%  (defun gnus-convert-old-newsrc ()
%    "Convert old newsrc formats into the current format, if needed."

If I'm reading this function right, then _every_ time someone runs Gnus
from the trunk of Emacs they would have to do an 'initial sync' of all
their groups, because "Gnus v5.13" will never be >= "Ma Gnus.*".

Doing an initial sync for large sets of IMAP groups means that the users
will have to download several MBytes of data _every time_ they start
Gnus.  We should probably fix this some way toa void so large startup
downloads and, as a result, slow startup times.

The time different during the startup of Gnus and the amount of data
downloaded is too large to ignore it.  Running the following snippet in
emacs-24 and trunk I got the following results a few minutes ago:

(let ((info (format "%s"
		    (list
		     (format-time-string "%H:%M:%S Loading Gnus" (current-time))
		     (gnus)
		     (format-time-string "%H:%M:%S Finished loading Gnus" (current-time))))))
  (with-current-buffer "*scratch*"
    (insert info)))

Output:

| Branch          | Start Time | End Time | Duration | Downloaded |
|-----------------+------------+----------+----------+------------|
| Emacs-24 branch |   22:03:24 | 22:03:45 | 21 sec   | 148k       |
| trunk branch    |   22:04:43 | 22:06:11 | 88 sec   | 18350k     |

A 4x delay in startup time and more than 10x difference in downloaded
data is really _huge_.




  parent reply	other threads:[~2013-07-09 20:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 10:40 Emacs trunk and Gnus master are fully sync'd now Katsumi Yamaoka
2013-07-02 16:52 ` Giorgos Keramidas
2013-07-06 15:21   ` Lars Ingebrigtsen
2013-07-06 15:44     ` David Engster
2013-07-06 18:45       ` David Engster
2013-07-06 20:03         ` David Engster
2013-07-07 13:27           ` Giorgos Keramidas
2013-07-07 13:24       ` Giorgos Keramidas
2013-07-07 19:51         ` David Engster
2013-07-08 13:16           ` Giorgos Keramidas
2013-07-08 18:24             ` David Engster
2013-07-09 11:08               ` Giorgos Keramidas
2013-07-09 15:34                 ` David Engster
2013-07-09 18:16                   ` Giorgos Keramidas
2013-07-09 19:33                     ` David Engster
2013-07-09 19:39                       ` Ted Zlatanov
2013-07-09 20:41                       ` Giorgos Keramidas [this message]
2013-07-09 21:42                         ` David Engster
2013-07-10 15:32                           ` Ted Zlatanov
2013-07-10 19:17                           ` David Engster
2013-07-11 17:12                             ` Giorgos Keramidas
2013-07-18 13:31                           ` Lars Magne Ingebrigtsen
2013-07-18 15:42                             ` Giorgos Keramidas
2013-07-18 16:55                               ` David Engster
2013-07-18 17:15                                 ` Giorgos Keramidas
2013-07-30 14:56                               ` Lars Magne Ingebrigtsen
2013-07-30 19:58                                 ` Giorgos Keramidas

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67um8rbo6bpisw.fsf@saturn.laptop \
    --to=keramida@ceid.upatras.gr \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=yamaoka@jpl.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).