perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: mod_perl memory
Date Tue, 16 Mar 2010 19:50:30 GMT
Pavel Georgiev wrote:
> Let me make I'm understanding this right - I'm not using any buffers myself,
  all I do is sysread() from a unix socked and print(),
  its just that I need to print a large amount of data for each request.
Taking the issue at the source : can you not arrange to sysread() and/or 
print() in smaller chunks ?
There exists something in HTTP named "chunked response encoding" 
(forgive me for not remembering the precise technical name).  It 
consists of sending the response to the browser without an overall 
Content-Length response header, but indicating that the response is 
chunked.  Then each "chunk" is sent with its own length, and the 
sequence ends with (if I remember correctly) a last chunk of size zero.
The browser receives each chunk in turn, and re-assembles them.
I have never had the problem myself, so I never looked deeply into it.
But it just seems to me that before going off in more complicated 
solutions, it might be worth investigating.

View raw message