Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292386

Use symfony/var-exporter for encoding data in PHP cache backend

$
0
0

Problem/Motivation

unserialize is slow. Even though the cache items are stored in PHP files unserialization is still slow. Opcache does not much help in this case.

On Drupal sites served from Page Cache, loading the container from the cache backend is one of the most expensive operations in terms of its percentage of the total request time.

Proposed resolution

Use symfony/var-exporter for exporting cached data.

It claims to be much faster than unserialize()

The reason to use VarExporter::export() vs serialize() or igbinary is performance: thanks to OPcache, the resulting code is significantly faster and more memory efficient than using unserialize() or igbinary_unserialize().


Viewing all articles
Browse latest Browse all 292386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>