[Cubicweb] lgc.cache in cubicweb

Aurélien Campéas aurelien.campeas at logilab.fr
Fri Sep 9 15:45:36 CEST 2011


Le 09/09/2011 14:49, Sylvain Thénault a écrit :
> On 09 September 14:37, Aurélien Campéas wrote:
>> Le 08/09/2011 12:34, Sylvain Thénault a écrit :
>>> On 08 September 10:49, Aurélien Campéas wrote:
>>>> Also in lgc.cache all operations are protected by a lock (to mimick
>>>> the atomicity of a plain python dict I guess), which _maybe_ also
>>>> hurts a bit concurrent access performance.
>>>
>>> not only, that was mainly to avoid nasty cache bug on concurrent access.
>>>
>>
>> Does it still apply ?
>
> I suppose yes. Lock is needed to ensure consistency between cache dist and
> LRU list.
>
>> I'm a bit surprised a lock would be needed
>> there but not in the surrounding code.
>
> I don't get that.

If the objects using these caches (repository, native source) are shared 
amongst threads, we may have bigger probblems. But are they ?

>
>> Anyway I've just submitted a patch for your consideration.
>
> 'k
>




More information about the Cubicweb mailing list