Hi,

If Axis2/C is going to use axutil_string in the future for most of the
stuff, it may be worth considering the following idea.

The idea is to use a string pool for managing strings. There are
various ways to do this. For example we can create a string pool for
every request. When we want to use a string we take a string from this
pool and when we don't need a string we can release it to the pool. A
pool that belongs to a request can be a sub-pool of a global pool. The
beauty of this idea is that we can guarantee that there is no memory
leaks in string handling (of course we need to free the actual char
*).

Apart from the easiness we can get a big performance gain if we do
this. If we use a global pool we can allocate reasonable amount of
memory at the startup of Axis2/C. Because we are allocating large
number of strings at the same time, instead of hundreds of malloc
calls we need very few malloc calls and also free calls. Also the
strings are allocated very close to each other in memory, because of
that frequent access to strings will be faster.

I'm not sure whether this is possible in the current Axis2/C implementation.

Regards,
Supun.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to