Inets performance

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Inets performance

Sean Hinde-2
> 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

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

You can do things like:

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

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

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: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esp.erl
Type: application/octet-stream
Size: 8383 bytes
Desc: not available
URL: <>