I've got an Apache::SOAP service that sends several MB in the
response. The data is base64 encoded and sits (encoded) on the
filesystem. Currently, I slurp the file and return it as SOAP::Data,
causing memory usage to spike. I suspect the SOAP internals are
copying the data several times in the process of creating the final
The SOAP call from the client side takes ~30 seconds. An `scp` of the
same data takes 0.6 seconds.
Is there a way to stream the file or write directly to the Apache
response stream instead of slurping it into a scalar?
If there's no way to inject a stream as data, then is there a way to
circumvent Apache::SOAP for the response (but still use Apache::SOAP
for the request), writing XML directly to the response socket?