Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Balker Rasmussen <lbr@mjolner.dk>
Subject: Re: Yet another washing function.
Date: 13 Nov 1997 19:06:45 +0100	[thread overview]
Message-ID: <0fg1p0is7e.fsf@heimdal.mjolner.dk> (raw)
In-Reply-To: <0fen5w8br2.fsf@heimdal.mjolner.dk>

I wrote on October 8 1997:
> Greg Stark <gsstark@MIT.EDU> 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


  reply	other threads:[~1997-11-13 18:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-05  0:47 St. Suika Roberts
1997-10-05 11:27 ` Kim-Minh Kaplan
     [not found] ` <x7iuvc8f0r.fsf@peorth.gweep.net>
1997-10-06  0:57   ` Greg Stark
1997-10-08 16:23     ` Lars Balker Rasmussen
1997-11-13 18:06       ` Lars Balker Rasmussen [this message]
1997-11-13 21:37         ` Lars Magne Ingebrigtsen
1997-10-06 19:57 ` William M. Perry
1997-10-07 14:06 ` Michael Welsh Duggan
1997-10-12 14:53 ` Lars Magne Ingebrigtsen

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=0fg1p0is7e.fsf@heimdal.mjolner.dk \
    --to=lbr@mjolner.dk \
    /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).