From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/12819 Path: main.gmane.org!not-for-mail From: Lars Balker Rasmussen Newsgroups: gmane.emacs.gnus.general Subject: Re: Yet another washing function. Date: 13 Nov 1997 19:06:45 +0100 Message-ID: <0fg1p0is7e.fsf@heimdal.mjolner.dk> References: <0fen5w8br2.fsf@heimdal.mjolner.dk> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035152290 5858 80.91.224.250 (20 Oct 2002 22:18:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:18:10 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id MAA21986 for ; Thu, 13 Nov 1997 12:01:42 -0800 Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with ESMTP id NAA10145 for ; Thu, 13 Nov 1997 13:41:21 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no (8.8.7/8.8.7/ifi0.2) with SMTP id TAA12255 for ; Thu, 13 Nov 1997 19:06:52 +0100 (MET) Original-Received: (qmail 13810 invoked by uid 504); 13 Nov 1997 18:06:51 -0000 Original-Received: (qmail 13807 invoked from network); 13 Nov 1997 18:06:50 -0000 Original-Received: from heimdal.mjolner.dk (130.225.8.65) by claymore.vcinet.com with SMTP; 13 Nov 1997 18:06:50 -0000 Original-Received: (from lbr@localhost) by heimdal.mjolner.dk (8.7.6/8.7.3) id TAA27359; Thu, 13 Nov 1997 19:06:45 +0100 (MET) Original-To: ding@gnus.org Original-Lines: 59 X-Mailer: Gnus v5.5/Emacs 20.2 Xref: main.gmane.org gmane.emacs.gnus.general:12819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:12819 I wrote on October 8 1997: > Greg Stark writes: >> I've noticed that article washing is a noticeable delay. > > Quite! If I try to view a LARGE article which I know what's in, I might > as well press C-g after a couple of seconds to avoid waiting for ages. > The article appears pretty much like I'd expect if I'd waited the entire > time, but I haven't looked into it further. That's annoying... After receiving a few 30000-lines mail these last couple of days I broke down and investigated a bit more. The HUGE time-wasters are perhaps unsurprisingly the highlight functions in gnus-article-display-hook. By applying the following nasty hack to 5.4.67's gnus-art.el I'm a much happier man. Is it possible to clean up the highlight functions[1] to make them more efficient, or could my hack be cleaned up[2] and used? Whatever, 30000-line mails now pops up in an Article buffer the instant I want them, not after I've pressed C-g... Cheers, Lars ---------------------------------------------------------------------- --- gnus-art.el.orig Sat Sep 13 15:43:22 1997 +++ gnus-art.el Thu Nov 13 18:53:55 1997 @@ -1901,6 +1901,14 @@ (forward-line line) (point))))) +(defun gnus-run-article-display-hook () + (if (and (gnus-fetch-field "Lines") + (> (string-to-number (gnus-fetch-field "Lines")) 1000)) + (loop for hook in gnus-article-display-hook do + (if (not (string-match "highlight" (symbol-name hook))) + (funcall hook))) + (run-hooks 'gnus-article-display-hook))) + (defun gnus-article-prepare (article &optional all-headers header) "Prepare ARTICLE in article mode buffer. ARTICLE should either be an article number or a Message-ID. @@ -2010,7 +2018,7 @@ (funcall gnus-show-mime-method) (funcall gnus-decode-encoded-word-method))) ;; Perform the article display hooks. - (run-hooks 'gnus-article-display-hook)) + (gnus-run-article-display-hook)) ;; Do page break. (goto-char (point-min)) (setq gnus-page-broken ---------------------------------------------------------------------- [1] I noticed that I have both gnus-article-highlight and gnus-article-maybe-highlight in my gnus-article-display-hook. I suppose I have a reason for that. [2] I suppose a variable instead of my hardcoded 1000 would be nice :-) -- Lars Balker Rasmussen, Software Engineer, Mjolner Informatics ApS lbr@mjolner.dk