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