Zend_Cache unserialize - hog memory?

I have Zend_Db_Table_Abstract installed, so it uses the metadata cache and then profiled with xhprof to find out how much memory it uses.

Turns off 34 calls from _setupMetadata to Zend_Cache_Core :: load uses 7mb memory, most of which is used when calling unserialize.

Configuration for metadata cache:

resources.cachemanager.db_metadata.frontend.name = Core
resources.cachemanager.db_metadata.frontend.options.automatic_serialization = true
resources.cachemanager.db_metadata.frontend.options.lifetime = null

resources.cachemanager.db_metadata.backend.name = File
resources.cachemanager.db_metadata.backend.options.cache_dir = APPLICATION_PATH "/../data/cache/db_metadata"

Is this a common problem, or am I missing something?

+3
source share
1 answer

Since you serialize an object, it takes up a lot of memory. Especially the Zend_Db_ * object.

Here we had the same problem, and we finished creating our own cache system.

, sleep/wakeup, ivar Zend_Db_Table_Row_Abstract, .

.:)

0

Source: https://habr.com/ru/post/1755288/


All Articles