﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	appname	phpversion	exts	sapi	probability	blockedby	blocking
237	xcache_get() takes out write lock	Aryeh Gregor	moo	"If I try xcache_get()ing a very large array (assigning it to a variable causes PHP's memory usage to rise by ~50M), from a lot of different threads at once, performance drops like a stone.  Debugger <http://poormansprofiler.org/> shows lots of processes stuck in xc_fcntl_lock().

If I serialize() the array to a string and store the string rather than an array, there are no locking problems that I notice even with lots of requests, but the xcache_get()+unserialize() of the string takes a lot longer (on a single thread) than xcache_get() of the array.

I looked at the source code and it seems that even xcache_get() is taking out write locks.  Could it maybe be modified to take out read locks instead, so there's no lock contention?  The variable is practically never changed, in my case.  I imagine problems would arise if you were reading smaller variables often enough, too.

I asked on IRC and icy suggested I file a ticket."	defect	new	minor	4.0.0	cacher	1.2.2					PHP 5.2.6-2ubuntu4.5		Irrelevant	Always		
