improve scribble memory use (a little bit)

svn: r9601

original commit: 52581d024b42ad472d8cd0cae807948325771511
This commit is contained in:
Matthew Flatt 2008-05-02 19:48:57 +00:00
parent 1032bb867b
commit 0bf463f500
3 changed files with 29 additions and 23 deletions

View File

@ -12,7 +12,8 @@
net/base64
scheme/serialize
(prefix-in xml: xml/xml)
(for-syntax scheme/base))
(for-syntax scheme/base)
"search.ss")
(provide render-mixin
render-multi-mixin)
@ -203,8 +204,8 @@
(let ([p (path->main-collects-relative p)])
(if (path? p)
(path->root-relative p)
p))
p)))
(intern-taglet p)))
(intern-taglet p))))
(define (relative->path p)
(let ([p (main-doc-relative->path p)])

View File

@ -424,21 +424,22 @@
id)
(exporting-libraries-libs e)
(exporting-libraries-source-libs e))]
[tag (list (if sig
(case sym
[(def) 'sig-val]
[(form) 'sig-def])
sym)
(append
(list lib-taglet)
(if sig (list (syntax-e (sig-id sig))) null)
(list (syntax-e id))))])
[tag (intern-taglet
(list (if sig
(case sym
[(def) 'sig-val]
[(form) 'sig-def])
sym)
(append
(list lib-taglet)
(if sig (list (syntax-e (sig-id sig))) null)
(list (syntax-e id)))))])
(if (or sig (not dep?))
(list (mk tag))
(list (make-target-element
#f
(list (mk tag))
`(dep ,(list lib-taglet (syntax-e id)))))))
(intern-taglet `(dep ,(list lib-taglet (syntax-e id))))))))
content)))
(lambda () (car content))
(lambda () (car content))))))
@ -462,7 +463,7 @@
(make-redirect-target-element
#f
null
(list kind (list taglet id))
(intern-taglet (list kind (list taglet id)))
path
anchor))])
(make-element
@ -1029,14 +1030,15 @@
(list (make-hover-element
#f
(list e)
(string-append
"Provided from: "
(let loop ([from from])
(if (null? (cdr from))
(format "~s" (car from))
(format "~s, ~a"
(car from)
(loop (cdr from))))))))
(intern-taglet
(string-append
"Provided from: "
(let loop ([from from])
(if (null? (cdr from))
(format "~s" (car from))
(format "~s, ~a"
(car from)
(loop (cdr from)))))))))
(list e))))
(lambda () e)
(lambda () e)))

View File

@ -203,7 +203,10 @@
"serialization failed (wrong resolve info? delayed element never rendered?); ~a"
(exn-message exn)))])
(vector
(make-element #f (delayed-element-content d ri))))))
(let ([l (delayed-element-content d ri)])
(if (and (pair? l) (null? (cdr l)))
(car l)
(make-element #f l)))))))
#'deserialize-delayed-element
#f
(or (current-load-relative-directory) (current-directory))))