Thursday, February 7, 2008

Axis2/C, Handling large attachment with Apache2

Dinesh has put a blog on the topic. Thanks Dinesh for that. Actually I am currently working on it. The main problem is why httpd does not release the memory after processing the request.
In Axis2/C MTOM implementation when a new buffer is read from the stream it reallocates the whole buffer for every read. Because of this string manipulation logic inside mime_parser seems bit simple. Now I am trying to manipulate the string without reallocating the whole buffer, instead keeping the buffers in an array. It seems really tough. Because string searching in two buffers seems really tricky. With a great deal of hard work I was able to send a 40M attachment using the new logic from simple_axis2_server.But httpd send only 39M. I am analyzing the problem. I noticed a huge gain in memory usage with the new logic. If you have any idea on improving this logic (inside axis2c/axiom/src/attachments/mime_parser.c) please let us know.

No comments: