Re: processing time

Subject: Re: processing time
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Fri, 2 Apr 1999 11:17:42 -0500 (EST)
[jim_albright]
> Dan - thanks for help.
> I added the (error ...) code and now completes in about 2 minutes
> instead of 24 minutes. I didn't fix anything though.
> It doesn't matter where in this code piece that I put (error ...).
> I love that it goes faster but why?
> 
> Jim Albright
> 
> (element (milestone)
>     (make sequence
>         (error
>             (string-append
>                 (inherited-attribute-string "book")
>                 " "
>                 (attribute-string "chapter")
>                 ":"
>                 (attribute-string "verse")
>             )
>         )

Because the error is executed and the sequence ends.  I think that if
you check the output, you'll find a lot missing.

Dan's suggestion was to add debug statements instead.  If there's
nothing that lends itself to meaningful console output, a trick I use
is a let:

(element milestone
	 (make sequence
	       (let ((foo (debug (string-append (inherited-attribute-string "book")
						" "
						(attribute-string "chapter")
						":"
						(attribute-string "verse")))))
		  (if (absolute-first-sibling?)
		      ...))))

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread