How to install on Windows?
Wolfgang Strobl
wks000 at t-online.de
Fri Dec 6 02:05:58 EST 2002
More information about the Python-list mailing list
Fri Dec 6 02:05:58 EST 2002
- Previous message (by thread): ADO constants
- Next message (by thread): How to install on Windows?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Gregory (Grisha) Trubetskoy" <grisha at ispol.com>: >> The problem _I_ am struggling with right now is how to write an output >> filter with mod_python for processing very large files, without reading >> the whole file into memory. Any suggestions? > >An apache *filter* has no notion of file size, That's fine with me. Replace "file" by "conent to be filtered". >it just processes data as >it is written out and has no control over how much data is passed through >it. I'm asking wether it reads the whole input into memory before giving it to my output filter, or perhaps collects all the written output before actually delivering it, and how to avoid that behaviour. > >You are probably referring to a handler. But in any event I don't see a >problem - read a little from the file, write to the network, repeat - >there is no reason to read large files into memory. Didn't work. I read the input in small chunks (filter.read(1024) or sumething) and even added a flush after the write. but it behaved no differently from doing a .read() followed from a single write(): the memory footprint of the process grew beyond belief, before I killed the process. -- Wir danken für die Beachtung aller Sicherheitsbestimmungen
- Previous message (by thread): ADO constants
- Next message (by thread): How to install on Windows?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list