ProcessWire - Performance: Unterschied zwischen den Versionen
Aus Wikizone
| Zeile 1: | Zeile 1: | ||
| + | == Caching == | ||
| + | === wireCache === | ||
| + | |||
== Performance Testen == | == Performance Testen == | ||
=== Zeit und RAM === | === Zeit und RAM === | ||
Version vom 12. Februar 2020, 10:31 Uhr
Caching
wireCache
Performance Testen
Zeit und RAM
// 8000 pages with title and body fields
$pp = $pages('template=basic, parent=1384');
$out = '';
foreach($pp as $p) {
$t = $p->title . microtime();
$b = $p->body . mt_rand(0, 1e5);
$out .= $t . $b;
}
echo strlen($out);
// 18384.08ms, 25.00 MB
// 8000 pages with title and body fields
$pp = $pages('template=basic, parent=1384');
$out = '';
foreach($pp as $p) {
$out .= $p->title . microtime();
$out .= $p->body . mt_rand(0, 1e5);
}
echo strlen($out);
// 17617.05ms, 25.00MB
$out = '';
foreach($pages('template=basic, parent=1384') as $p) {
$out .= $p->title . microtime();
$out .= $p->body . mt_rand(0, 1e5);
}
echo strlen($out);
// 17927.9ms, 25.00MB