Inets performance

Sean Hinde Sean.Hinde@REDACTED
Tue Mar 6 20:20:26 CET 2001


> Do you see anything useful to improve Inets performance for 
> large file ?

If you have plenty of memory you could store the file as a binary in
ets/mnesia and pull it out with a cgi-script. This works pretty well and is
fast. (as I understand it the binary isn't copied - ets just stores a
reference).

I use an mnesia table keyed on filename holding e.g.

#rec{name = "index.html", contents = #Bin}.

I also took one of Joe's contribs for embedding erlang code in html and
changed it about so it uses mnesia as a store (attached, with slight
documentation).

You can do things like:

<ee>
	<e>lists:map(fun({A,B}) -> </e>	
	   	<B>${A},</B>,${B}<P>
    	<e> end, Var)</e>
</ee>

It isn't perfect as the parser isn't clever enough to handle spaces in the
'wrong' places.. any help appreciated ..

It is in service without any problems though :)

- Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20010306/b7d2c807/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esp.erl
Type: application/octet-stream
Size: 8383 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20010306/b7d2c807/attachment.obj>


More information about the erlang-questions mailing list