trying to trace where the time is going

This commit is contained in:
Danny Yoo 2011-09-02 10:54:51 -04:00
parent 97681d43ec
commit eb2c71232c

View File

@ -241,12 +241,18 @@ MACHINE.modules[~s] =
(list->set (source-resources src)))) (list->set (source-resources src))))
(fprintf op "\n// ** Visiting ~a\n" (source-name src)) (fprintf op "\n// ** Visiting ~a\n" (source-name src))
(define temporary-output-port (open-output-bytes))
(time
(cond (cond
[(UninterpretedSource? src) [(UninterpretedSource? src)
(fprintf op "~a" (UninterpretedSource-datum src))] (fprintf temporary-output-port "~a" (UninterpretedSource-datum src))]
[else [else
(assemble/write-invoke stmts op) (assemble/write-invoke stmts temporary-output-port)
(fprintf op "(MACHINE, function() { ")])) (fprintf temporary-output-port "(MACHINE, function() { ")]))
(displayln (source-name src))
(displayln (bytes-length (get-output-bytes temporary-output-port)))
(write-bytes (get-output-bytes temporary-output-port) op)
(void))
(define (after-visit-src src ast stmts) (define (after-visit-src src ast stmts)