Subject: Re: Jade: conversion time From: hkirschk@xxxxxxxxxxxxxx Date: Mon, 19 Apr 1999 13:57:44 +0100 |
Guillaume, rouchyg@xxxxxxxxxxxxxxxxxxxxxxxxxxx on 19.04.99 11:52:10 Please respond to dssslist@xxxxxxxxxxxxxxxx To: dssslist@xxxxxxxxxxxxxxxx cc: (bcc: Heiko Kirschke/PLZ/CSC) Subject: Jade: conversion time Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable > I would like to make XML to HTML On-line conversion but the operation= > using Jade and a DSSSL stylesheet takes more 30 second which is not > acceptable when you request a document. Why does it take so much time= ? > Is it possible to reduce it ? How ? Can you be more specific in your question? For example, provide an example download containing your scripts and some data [since this might be a large archive, please do not post this directly to the list]. Since DSSSL is a complete programming language, you have to take care for efficiency as with any other programming language, too. In my experiences, it showed up that picking information from the part of the grove not found in the current local environment can consume a lot of time. Computing these values once and passing them down to the place where needed increased performance significantly. Also, try to figure out which part of your code needs much time. You can do that by inserting debug statements into you code, decorated with some information when the debug statement was reached. I was using something like: ;;; ;;; Debugging utilities ;;; (define %verbose% #t) (define (to-string object) (cond ((equal? object #f) "#f") ((equal? object #t) "#t") ((char? object) (string-append "'" (string object) "'")) ((string? object) object) ((number? object) (number->string object)) ((list? object) (string-append "(" (let loop ((first? #t) (rest object)) (cond ((null? rest) "") (first? (string-append (to-string (car rest)) (loop #f (cdr rest)))) (else (string-append " " (to-string (car rest)) (loop #f (cdr rest)))))) ")")) ((pair? object) (string-append "(" (to-string (car object)) " . " (to-string (cdr object)) ")")) ((symbol? object) (symbol->string object)) ((node-list? object) (string-append (string #\U-0023) (string #\U-003C) "node-list gi=3D" (gi object) (string #\U-003E))) (#t (string-append (string #\U-0023) (string #\U-003C) "unknown object" (string #\U-003E))))) ;; Write out an informational message to console: (define (info #!rest all-args) (if %verbose% (let ((output (debug (string-append (string #\U-000A) (string #\U-0009) (time->string (time)) " " (let loop ((a all-args)) (if (null? a) "" (string-append (to-string (car a)) (loop (cdr a))))) (string #\U-000A))))) #f) #f)) and inserting `debugging statements=B4 as proposed already on this list= like: (let ((info-1 (info "Now starting on do-something")) (do-something-sosofo (do-something)) (info-2 (info "Stopped on do-something"))) do-something-sosofo) Viele Gruesse, Heiko = DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Jade: conversion time, Didier PH Martin | Thread | Re: Jade: conversion time, Guillaume Rouchy |
Jade: conversion time, Guillaume Rouchy | Date | Re: Jade: conversion time, Guillaume Rouchy |
Month |