Improving servlet loading performance
svn: r685
This commit is contained in:
parent
7ada980df0
commit
9d4f01f1db
|
@ -250,11 +250,18 @@
|
||||||
;; refreshed (see dispatch).
|
;; refreshed (see dispatch).
|
||||||
(define (cached-load name)
|
(define (cached-load name)
|
||||||
(let ([e
|
(let ([e
|
||||||
(call-with-semaphore config:scripts-lock
|
; First try to get the cache entry
|
||||||
(lambda ()
|
(hash-table-get
|
||||||
(hash-table-get (unbox config:scripts)
|
(unbox config:scripts)
|
||||||
name
|
name
|
||||||
(lambda () (reload-servlet-script name)))))])
|
(lambda ()
|
||||||
|
; Then try to update the cache entry
|
||||||
|
(call-with-semaphore
|
||||||
|
config:scripts-lock
|
||||||
|
(lambda ()
|
||||||
|
(hash-table-get (unbox config:scripts) name
|
||||||
|
(lambda ()
|
||||||
|
(reload-servlet-script name)))))))])
|
||||||
(values (cache-entry-servlet e)
|
(values (cache-entry-servlet e)
|
||||||
(cache-entry-namespace e))))
|
(cache-entry-namespace e))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user