On 6/26/2010 5:27 PM, Stefan Fritsch wrote:
> But trunk has > 110 modules already. Maybe we should increase 
> DYNAMIC_MODULE_LIMIT from 128 to 192?

With your proposed optimizations, we can take it to 256 with still a
significant net win..

>>> 3) In server/config.c, many config vectors are created (allocated
>>> and  zeroed) with length (total_modules + DYNAMIC_MODULE_LIMIT).
>>> But this is only necessary before dynamic modules are loaded.
>>> Afterwards, total_modules is set to the total number of modules.
>>> Therefore allocating a vec of length total_modules should be
>>> enough. This would save zeroing 128 pointers per request and
>>> connection.
>>>
>>> It seems the attached patch works and I could not find any
>>> problems  when adding/removing modules during graceful restart.
>>> Objections?
>>
>> What of a separate alloc_modules variable, that would be init to
>> the old (total_modules + DYNAMIC_MODULE_LIMIT), and could be
>> truncated when the pre-config was complete to simply
>> total_modules.  This might even save additional
>> processing/merging/copying on the stale/unused NULL pointers.
> 
> I have commited something like this.

Will look Monday eve with anticipation, thanks!

Reply via email to