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

* Re: Half-compiled, slow gnus-cus.elc
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Hallvard B Furuseth @ 1996-07-31 12:26 UTC (permalink / raw)


oops, I wrote:
> Backquote is pretty slow

Correction:  *uncompiled* backquote is pretty slow.


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

* Re: Half-compiled, slow gnus-cus.elc
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-08-01 20:30 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

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

Yup.  However, the gnus-cus thingie is only evaluated once (when Gnus
is loaded), so I don't think putting much work into optimizing it is
all that useful.  In any case, Per has written the documentation to a
*much* nicer new version of custom, and I any work done to custom.el
as it stands now will probably be a waste -- the new custom will
probably share very little of the internals with the old custom.  I
think. 

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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