Project

General

Profile

Actions

Bug #24318

closed

Unnessessary serializing for memcached with variablefrontend

Added by Ralf Strobel over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-12-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using the caching framework for tables like "cache_pages" in combination with memcached is typically done through the combination of:

t3lib_cache_backend_MemcachedBackend + t3lib_cache_frontend_VariableFrontend

However, this involves an unnessessary serialize/unserialize whenever variables are stored or retrieved. The "set" function of php5-memcache can handle normal variables (even objects) where database tables would have to be fed a string.

The solution would be a slightly modified version of VariableFrontend that ommits the serializing but instead just passes on the variable it is issued (as a reference, ideally). The check for string datatype in the set function MemcachedBackend would of couse also have to be removed.

Bernhard Kraft already pointed this out in a mailing list:
http://typo3.toaster-schwerin.de/typo3_dev/2010_03/msg00006.html

According to him, the serializing/unserializing can be the actual bottleneck of caching, rather than data access.

This also fits the testing results of Steffen Müller:
http://www.t3node.com/blog/testing-the-forthcoming-typo3-caching-framework-with-memcached/

Of course the storage function in php5-memcache will also have to somehow serialize the data it gets. My hope is though that this might be more efficient than doing it yourself within php.

Even if this is not the case, it might be worth thinking about ways to make nonserialized storage possible within the caching framework. There are other services such as XCache that are able to handle compiled php-code directly.
(issue imported from #M16719)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #20582: caching of pagesections uses superfluos serialize() callClosedRupert Germann2009-06-06

Actions
Related to TYPO3 Core - Bug #24400: [Caching framework] Update to latest FLOW3 versionClosedChristian Kuhn2010-12-22

Actions
Actions

Also available in: Atom PDF