[drupal-devel] performance improvements - avoiding big unserialize()

James Walker walkah at walkah.net
Fri Oct 21 14:00:54 UTC 2005


On 10/21/05 9:10 AM, Moshe Weitzman wrote:
> In speaking with Rasmus last night, he discouraged us from using 
> unserialize() on large arrays when possible. This eats memory and speed. 
> We do this at lkeast twice on evrry page view: the menu cache and the 
> variables cache (i.e. $conf).
> 
> Rasmus' suggestion was to store these arrays without serialization in a 
> shared memory system like APC. I have a long term plan to add *optional* 
> shared memory storage for these arrays and maybe others as they arise. 
> Perhaps someone else wants to move this forward quickly. Comments welcome.

well, my experiences with APC have been pretty mixed - seems to work 
really well for a while. However, I'm *all* for promoting some further 
collaboration with Rasmus... and yeah APC would probably be much better 
for this stuff (or memcache which has a PECL extension 
http://pecl.php.net/package/memcache as well).

the big issue, though, is to have something (maybe just status quo?) for 
folks that don't have a shared memory option (i.e. typical hosting 
environments) - the good news is they're the ones that don't usually run 
into performance issues.

all that to say +1 :)

-- 
James Walker :: http://walkah.net/



More information about the drupal-devel mailing list