Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
Sébastien Vauban wrote: Hi David, David Maus wrote: Sébastien Vauban wrote: it just perfectly *works*! Great, great feature... Thanks a lot. Sweet! I must add that 14 seconds is the average time for my huge folder. For folder of more traditional sizes (less emails), it's more or less instantaneous... I suppose (from the timing of the functions) that what takes that long is Gnus building the view of the folder. Thanks... Just pushed to master. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgpsHmsysdg2o.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
Sébastien Vauban wrote: it just perfectly *works*! Great, great feature... Thanks a lot. Sweet! I'm excited about using this all the time now... Will you make that part of the master? Sure, its on my list and will be pushed tomorrow (i think). HTH, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgpPCuKDrEbMk.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
Sébastien Vauban wrote: Just to say I'm back online -- after a week holiday and an almost nil access to the newsgroups. Thanks a lot for trying to get Gnus better behaving in face of slow servers like Courier... Do you want me to test something special to move things forward? Okay, could you try the attached patch? It is based on current master and tries to look up the article number (uid) in NOVCACHE and falls back to UID SEARCH when the message is not cached. To make a message enter Gnus' cache you might to modify `gnus-cache-enter-articles'. The cache setting I used to test the patch are: ,[ gnus.el ] | (setq nnimap-nov-is-evil nil) | (setq gnus-use-cache t) | (setq gnus-cache-enter-articles '(ticked dormant unread read)) ` NOTE: This patch is deliberately not attached as text/plain to avoid the patchtracker catching it (no proper commit message and all). Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de 0001-Try-fix-1.patch Description: Binary data ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
Tassilo Horn wrote: Second it would return a cons (min-UID . max-UID). That wouldn't help us, would it? What an appropriately named function that is. ;-) No, that wouldn't help. But its code could be stolen to write and own function to insert the right NOV file in a temp buffer, to search for the message-id. Something like that: Well, using `nnimap-retrieve-headers-from-file' would work because it loads the cache into `nntp-server-buffer'. But it turned out that my problem with the garbled cache is a bug in this function: It doesn't erase the buffer before inserting the cache file and the buffer is not empty (bug report filed). So we need our own function. A slight modification of yours: --8---cut here---start-8--- (defun org-gnus-nnimap-get-article-number (group server message-id) (with-temp-buffer (let ((nov (nnimap-group-overview-filename group server))) (when (file-exists-p nov) (mm-insert-file-contents nov) (set-buffer-modified-p nil) (goto-char (point-min)) (catch 'found (while (search-forward message-id nil t) (let ((hdr (split-string (thing-at-point 'line) \t))) (if (string= (nth 4 hdr) message-id) (throw 'found (number-to-string (nth 0 hdr))) --8---cut here---start-8--- - the message-id might also appear in a in-reply-to oder references field - use a temp buffer to avoid possible confusion for Gnus (e.g. content of nntp-server-buffer changed outside Gnus) Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgptd3ICl9sJa.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
Tassilo Horn wrote: Nick Dokos nicholas.do...@hp.com writes: Hi Nick, [Warning: I know very little about gnus, perhaps just enough to be dangerous and you probably already know all this, but just in case... The bit that caught my attention is the slowness of the uid search command on some versions of Courier, which seems... related.] Yeah, just a minute ago when replying to David I also stumbled across that paragraph. So maybe we are trying to replace one extremely long running command which only occurs when following links (or searching for Message-Ids) with a constant slowness in normal operation. But let's try it out. Finally I got a novcache: ,[ gnus.el ] | ;;; Experimental Gnus setup | | (setq gnus-select-method '(nntp news.gmane.org)) | (setq gnus-secondary-select-methods | '((nnimap localhost | (nnimap-address localhost) | (nnimap-server-port 993) | (nnimap-stream ssl | | (setq nnimap-nov-is-evil nil) | (setq gnus-cache-enter-articles '(ticked dormant unread read)) | | (setq org-gnus-nnimap-query-article-no-from-file t) ` Now the strange thing is that the novcache file in ~/News/overview is 100% identical to .overview in ~/News/agent , | dm...@t41 ~/News % md5sum overview/nnimap/localhost/INBOX/1280089306/novcache agent/nnimap/localhost/INBOX/.overview | b4a78e25a064f0c260f76080a00991cd overview/nnimap/localhost/INBOX/1280089306/novcache | b4a78e25a064f0c260f76080a00991cd agent/nnimap/localhost/INBOX/.overview | dm...@t41 ~/News % ` Anyway: `nnimap-retrieve-headers-from-file' does not work as expected. First, it requires the group parameter without backend and server prefix (e.g. INBOX instead of nnimap+localhost:INBOX. Second it would return a cons (min-UID . max-UID). That wouldn't help us, would it? Third and amazingly my novcache seems to be corrupt right after creation: `nnimap-retrieve-headers-from-file' does not get the maximum UID but reads INBOX (?!) -- A string that looks kind of a header information for nov -- and not 18753 what is the highest UID in the mailbox. Last line of the cache: (it's a local copy of wanderlust general newsgroup accessed via IMAP) , | 18753 Re: checking imap folder unplugged Yoichi NAKAYAMA yoi...@eken.phys.nagoya-u.ac.jp Sun, 13 Oct 2002 10:19:13 +0900 wyadljm8z2...@eken3.eken.phys.nagoya-u.ac.jp 87ptvqcd9p...@eken.phys.nagoya-u.ac.jp442413 Xref: t41.ictsoc.de INBOX:18753 Newsgroups: gmane.mail.wanderlust.general.japanese ` Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de pgp8bzQNu4ToA.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode