[En-Nut-Discussion] Pictures load very slow

Andreas Genzel enlist at touch2nut.de
Sat Jan 7 15:43:10 CET 2006


Hi Thorsten,

I had the same problems - I don´t think it´s a problem of urom (I use the
xflash-driver of Michael Fischer), I thought its a problem of the handling
of the http-requests (all files loades properly when I accessed from LAN -
when I access via external adress (DynDNS)- the same problem.

So I did not find reason but a solution that worked for me:

1. Created a cgi-routine which sends the pictures. 
2. You have to replace the hyperlinks of the images of your webpages with
the cgi-calls (instead of path and name of picture)   

To send the picture in the cgi-routine just send 
   NutHttpSendHeaderTop(stream, req, 200, "Ok");
   NutHttpSendHeaderBot(stream, "image/jpeg"[or whatever type it is],
3456[length of picture]);
   Send the bytes
   flush the stream

I know, not very elegant but ...

Hope it helped

Andreas Genzel
 

-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Hugo Simon
Sent: Saturday, January 07, 2006 3:09 PM
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] Pictures load very slow

I experimented a bit and found the following:

1. Free heap is constant, no memory leak 2. If I increase the number of http
threads from 4 to 8 the problems becomes more intensive. Nearly every page
load drops some pictures.

Can it be that there is a problem in the urom device driver if more then one
thread opens a file. If a page contains a few pictures and the browser
requests these pictures simultanously, maybe then the NutHttpProcessRequest
fails in opening the picture file from the urom?

BTW. I am using NutOS 3.9.8

It would be great if anyone could help.

Thank you
Thorsten

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list