[TYPO3-core] RFC #14455: Wrong variable in t3lib_cache_backend_memcachedbackend leads to redundant data
Christian Kuhn
lolli at schwarzbu.ch
Sun Jun 6 03:06:51 CEST 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14455_test.diff
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100606/b03b5eac/attachment.bin>
More information about the TYPO3-team-core
mailing list