Re: slow static pages
"Dr. Helmut G. Enders" <[email protected]> Fri, 18 Aug 2006 20:33:52 +0200
| Newsgroups | gmane.lisp.cl-http |
|---|---|
| Message-ID | <[email protected]> |
Honorable John C. Mallery writes on 18.08.2006 16:03:
> 3. I would try running the profiler on your lisp to determine where
> the time is being spent.
Progress report: :-)
(defun %process-request (server stream)
;; Some code deleted.
;; ...
;; Epilogue
(prog1 (when (live-connection-p stream) ; Dead connection returns NIL 12/11/2003 -- JCMa.
(let ((persistent-connection-p (and (server-persistent-connection-p server) ;set
by positive predicate
(not (server-close-connection-p server)))))
;errors may set this
;; Don't force output if there is incoming data: pipeline responses
(unless (and persistent-connection-p (http-input-data-available-p stream nil))
(force-output stream)) ;force output while deciding what to do next
persistent-connection-p)) ;return whether to continue reading requests
from the stream
;; Count completed requests
(incf (server-requests-completed server)))))
The function returns 'persistent-connection-p' which is T in my case
(http:export-url #u"/doc" :directory ...)
If the function would return NIL instead, loading time goes from 10 seconds to 1/10 second.
Helmut
--
-----------------------------o-----------------------------
CS Cybernetic Systems GmbH / Dr. Helmut G. Enders
Markgrafenstr. 19 / T: +49 9287 9929 11
D-95100 Selb / F: +49 9287 9929 32
Germany / E: [email protected]
------------------------o----------------------------------
_______________________________________________
WWW-CL mailing list
[email protected]
https://lists.csail.mit.edu/mailman/listinfo/www-cl