Hi, On Fri, Jun 20, 2008 at 01:03:26PM -0400, Jorge Arellano Cid wrote:
Hi there,
- Changed Textblock::addText() to internally allocate its text string, making the memory handling opaque to the caller.
Does anybody remmeber the topic of addText() deleting a malloc'ed block of memory?
I decided to make the change for API cleanliness/correctness and set the Textblock do the whole memory handling (i.e. now the Textblock is the one that allocates/deallocates the text string).
The HTML parser was adjusted a bit to keep its old performance.
Very nice! I thought this is the right moment to drag out my old text allocation optimization. And now it really makes a difference. I see about 10M less memory usage on the mysql page and most important, leaving that huge page is quite a bit faster - as there is less free() calls. The result may be completely different on Linux however. So please give it a try on Linux. Cheers, Johannes