Gnus development mailing list
 help / color / mirror / Atom feed
* Half-compiled, slow gnus-cus.elc
@ 1996-07-31 12:22 Hallvard B Furuseth
  1996-07-31 12:26 ` Hallvard B Furuseth
  1996-08-01 20:30 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Hallvard B Furuseth @ 1996-07-31 12:22 UTC (permalink / raw)


gnus-cus.el uses backquote in (calculate ...) forms, which are not
compiled.  Backquote is pretty slow; it must first compute the form to
be executed and then execute it.

Possible fixes:

In custom.el, define a byte-optimizer for custom-declare:
  (eval-and-compile
    (put 'custom-declare 'byte-optimizer
         '(function which parses the custom form and
           byte-compiles the (calcuate ...) part    )))
I don't know how hard that would be, I don't know the exact syntax of a
custom-declare form.

Or, in gnus-cus.el, use something like this:
  (eval-when-compile (require 'bytecomp))
  (custom-declare
    `(... ,(cons 'calculate
               	 (byte-compile-sexp '(form to be calcuated)))))

Or simply don't use backquote.

It might also be an idea to push for modifying bytecomp somewhat: Define
(quote-form ...) which quotes a form to be compiled, similar to
(function ...) which quotes a function to be compiled.  Then the code
above wouldn't have to refer to bytecomp:

  (custom-declare
    `(... ,(cons 'calculate
               	 (quote-form (form to be calcuated)))))


Regards,

Hallvard


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-08-01 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-31 12:22 Half-compiled, slow gnus-cus.elc Hallvard B Furuseth
1996-07-31 12:26 ` Hallvard B Furuseth
1996-08-01 20:30 ` Lars Magne Ingebrigtsen

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).