[Lispweb] Question: Lisp CGI that loads big hash only once
als at thangorodrim.de
als at thangorodrim.de
Wed Apr 12 10:14:05 CDT 2006
On Wed, Apr 12, 2006 at 04:09:11PM +0200, rso at gmx.at wrote:
>
> I have written a parser for French in clisp. Now I would like to publish it ony my website
> http://rso.mine.nu. But I have a big problem with the dictionary which is a hash with +122000
> entries all added in the form of:
> (setf(gethash "complaisance" *dict*)'((NOM "complaisance" f s ((NIL )) 10.66)))
>
> Now what I want to do, is load the dict.lsp once when I start the parser. In all other runs when
> somebody starts the lisp cgi, the cgi script can use the variable *dict* too.
>
> I am using the cgi-utils [1]. The software should run on a ubuntu apache2 and a freebsd 5.3 apache2
> server.
>
> I would like to avoid a database because of the installation and connection difficulties.
>
> I would be very happy about an idea about how to load a variable once and let all other clisp cgi
> scripts use this variable afterwards.
>
> [1] http://www.cliki.net/lisp-cgi-utils
Is your dictionary data static or will it be changed during runtime?
Following your description, I suppose it is static. Why not make it part
of your dumped Lisp image for the CGIs (you _are_ running from a dumped
image instead of starting clisp and the loading fasls, right?)?
Just create your running image, load the dictionary, dump the image and
run your CGIs from that dumped image.
Regards,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison
More information about the lispweb
mailing list