Hello,
I just ported a small web application to Webware. Part of the application
involves sending large amounts of data to the client (file download).
For obvious reasons I don't want the response to be cached, so I invoke
commit() on the response. After that, the servlet goes into a loop the gist
of which is the following:
while 1:
... book keeping
data = file.read(50000)
if len(data) == 0:
break
response.write(data)
response.flush()
... book keeping
Unfortunately, inspite of the commit(), the response seems to be cached -
the client doesn't receive any data for large files and the python
process handling the requests starts consuming a lot of CPU (and
its memory usage according to top() fluctuates a lot, indicating a
lot of GC work being done, which would be consistent with
re-creating/concatenating a bunch of large buffers).
Do I need to do anything other than commit()?
One noteworthy point is that I am using the built-in HTTP server rather than
going through the Apache module or FastCGI. Could it be that the http-server
is cacheing the whole response?
Thanks!
--
/ Peter Schuller, InfiDyne Technologies HB
PGP userID: 0xE9758B7D or 'Peter Schuller <[EMAIL PROTECTED]>'
Key retrieval: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss