[development] Object caching

Gerhard Killesreiter gerhard at killesreiter.de
Sat Jul 22 09:06:27 UTC 2006


Bart Jansens wrote:
> Op vr, 21-07-2006 te 01:34 +0200, schreef Gerhard Killesreiter:
>> Khalid B wrote:
>>>>>> That is one hell of a menu.  Would be good if we could actually
>>>>>> improve the menu system.  Have you looked into that?
>>>>> I've been on the verge of bringing this up for a while.
>>>>>
>>>>> The issue we have with the menu is the exact same issue we had with the
>>>>> aliases until 4.7.
>>>>> We load the entire path alias into memory on every load.
>>>> Past tense.
>>>>
>>>> We've replaces the one big load by a plethora of small loads. I am
>>>> convinced this isn't a an improvement in all cases. E.g. on drupal.org,
>>>> we got plenty of memory to burn, so the old setup probably wasn't much
>>>> of a problem.
>>> Memory was an issue, but not the main one.
>>>
>>> The main issue was using PHP to create an associative array for every
>>> page load, which bogged down everything. I installed the backport of
>>> the 4.7 patch for a client who has a dedicated SMP server with 2GB
>>> of RAM and it made a world of a difference there.
>>>
>>> You can see the statistics here:
>>>
>>> http://baaheyeldin.com/click/593/0
>> Yeah, if you have many aliases, then this is an improvement, if you only 
>> have a few, then it isn't.
> 
> How about loading all aliases at once when the number of aliases is
> smaller than <insert some magic number here>, and loading them one by
> one when there are more.

Sounds like a good idea. The magic number should probably be set to some 
fixed value and have a variable_get without a visible interface.

Unless somebody comes up with an easy way to calculate the magic number. :p

> This is one of the first things i changed after the last upgrade because
> I have only 10 aliases or so, no worth the additional 50 queries it took
> to generate my front page ;)

Please post a patch :)

Cheers,
	Gerhard



More information about the development mailing list