cache on content and type, not just content
svn: r1084 original commit: 0b12dcfd547e93d0df117ca5572bfc43e6e1ae6a
This commit is contained in:
parent
4c452a36a8
commit
c31251df6d
|
@ -46,7 +46,7 @@
|
|||
(define cached (make-hash-table 'equal))
|
||||
|
||||
(define (get-or-load-bitmap content orig type)
|
||||
(hash-table-get cached content
|
||||
(hash-table-get cached (cons content type)
|
||||
(lambda ()
|
||||
(let ([bm (let ([fn (make-temporary-file)])
|
||||
(dynamic-wind
|
||||
|
@ -62,5 +62,5 @@
|
|||
(error 'include-bitmap
|
||||
"unable to parse image, originated from: ~a"
|
||||
(path->string (bytes->path orig))))
|
||||
(hash-table-put! cached content bm)
|
||||
(hash-table-put! cached (cons content type) bm)
|
||||
bm)))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user