[TYPO3-core] RFC #14455: Wrong variable in t3lib_cache_backend_memcachedbackend leads to redundant data

Dan Osipov dosipov at phillyburbs.com
Sun Jun 6 15:24:51 CEST 2010


Thanks for the tests & commit!

Dan Osipov
http://danosipov.com/blog/

Christian Kuhn wrote:
> Dan Osipov wrote:
>> Problem:
>> Wrong variable is used in the array_search in addIdentifierToTags 
>> function. Entry identifier doesn't exist in the tag array, so the tags 
>> are duplicated for the entry.
>>
>> Its easy to spot a problem with a debugger, or simply by reading the 
>> code.
> 
> * Committed to trunk rev. 7810, 4.3 rev. 4811.
> 
> Very good catch!
> 
> This one is a real performance killer for memcache, the bug leads to:
> - n*n-tags applied to an identifier, instead of n-tags
> - a memcache->set() call for every tag, instead of one.
> 
> Attached two simple performance unit test hack ups, first one measures 
> time taken for adding 100 tags to an entry, second one measures flushing 
> of such an entry.
> After the patch setManyTags() is about 50 times faster (!!) and 
> dropManyTags() about 20 times for me.
> 
> Karsten already committed this to FLOW3 trunk, rev. 4336, so no need to 
> report upstream anymore.
> 
> Thanks
> Christian
> 


More information about the TYPO3-team-core mailing list