From: Timothy J. H. <ti...@cs...> - 2004-09-28 20:49:37
|
On Sep 28, 2004, at 4:34 PM, Ken Anderson wrote: > Tim, > > Your various servlets always read and evaluate a file, which is fine > for your course and development, but what about performance? > > Could we get a servlet that only reads the file once? Or maybe even > never - it calls a function that its already loaded? I haven't though much about it, but its a good idea. A partial solution would be to write servlets as follows: (servlet (a b c ... z) (use-module "/full/path/to/file/F.scm") (F a b c ... z) ) The server would still have to read and parse the file, but it would be a relatively small file. One could also skip even this small amount of parsing by using a cache to see if the file has been read before... (This would go in WEB-INF/scheme/scheme.sss) I haven't tried either of these, but it would be interesting to see how much they improve performance. (I've found httperf to be a nice tool for measuring servlet performance....) ---Tim--- > k > |