ProcessWire - Performance

Aus Wikizone
Wechseln zu: Navigation, Suche

Caching

wireCache

https://processwire.com/blog/posts/processwire-core-updates-2.5.28/#wirecache-upgrades
https://processwire.com/talk/topic/15286-delete-and-generate-new-markup-cache/

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

Performance und Repeater Matrix

https://processwire.com/talk/topic/20156-are-there-hidden-scalabilityperformance-issues-when-making-heavy-use-of-repeater-matrix-or-pagetable-fields/

Backend

  • Repeater Items per AJAX laden
https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#repeater-upgrades-continued-in-pw-3.0.5

Frontend

  • Können viele Datenbank (PDO) Queries auslösen, da alle Page Objekte geladen werden müssen.

Auswahl aus verschiedenen Repeatern über ein Select, statt einzelnes RepeaterMatrix Feld

Evtl. könnte man ein Auswahlfeld generieren, das dann wiederum einen Contentblock wählt, statt alles in ein RepeaterMatrix Feld zu packen.

  • Layoutblock -> Select Feld
  • Optionen werden geladen.

Alternativ PageTables

https://processwire.com/talk/topic/7459-module-pagetableextended/

Könnte Performancemäßig die bessere Alternative sein. Prüfen und auch mit PageTableExtended verbinden.