Just did some quick bench of the current trunk,
and the results are not very much encouraging.
static void test_performance(abts_case *tc, void *data)
{
apr_status_t rv;
int i;
void *m;
apr_time_t end, now = apr_time_now();
for (i = 0; i < 1000000; i++) {
apr_pool_t *p;
apr_pool_create(&p, NULL);
m = apr_palloc(p, 1234);
apr_pool_destroy(p);
}
end = apr_time_now();
printf("\n\nFinished in %ld\n", end - now);
}
Apr 1.4
Finished in 371490
Apr trunk
Finished in 1359345
So the trunk takes almost 4 times longer to finish!
I thought that the problem might be the fact that
each pool creates its own mutex, well if I
#if 0
(void)apr_thread_mutex_create(&pool->mutex,
APR_THREAD_MUTEX_NESTED, pool);
#endif
inside apr_pool_create_ex, the results are better
Finished in 798145
However this is still twice slower!
Tests performed on
Linux 2.6.18-92.1.13.el5 #1 SMP Thu Sep 4 03:51:01 EDT 2008 i686 i686 i386
GNU/Linux
Regards
--
^(TM)