View Issue Details

IDProjectCategoryView StatusLast Update
0000287Adventure PHP FrameworkCode-Verbesserung // Code improvementpublic2016-03-12 16:56
ReporterChristianAchatzAssigned ToChristianAchatz 
Status resolvedResolutionfixed 
Product Version3.1 
Target Version3.2Fixed in Version3.2 
Summary0000287: Improve place holder performance
DescriptionSetting place holders within a document directly injects values into a place holder instance (PlaceHolder interface, PlaceHolderTag, LanguageLabelTag) by traversing the DOM tree.

This is time consuming with setting place holders but extremely fast with transformation.

This issue is to find a smart solution to speed up place holder management (setting, transformation).
TagsNo tags attached.
Codereferenz: ([Datei]:[Zeile])



2016-03-12 13:42

administrator   ~0000683

Last edited: 2016-03-12 14:55

View 2 revisions

Solution 1:
Implementation idea is to introduce a separate field into DomNode and Document to set, get, and delete place holders. Storage to be implemented as simple associative array to speed up access.

Place holders then fetch values from parent object's place holder storage.

Solution 2:
Place holders register themselves with the parent document and setting place holders then just needs to run through the registration list to inject values.


2016-03-12 14:55

administrator   ~0000684

Test results:

Solution 1:
- Faster with setting place holders between 190% and 490%
- Interestingly slower with transformation though only array index access between 40% and 46%
- Total speed increase: 62%
- Pro: nicely fits into DomNode and Document API

Solution 2:
- Faster with setting place holders between 78% and 360%
- Almost same results than current implementation for transformation
- Total speed increase: 107%
- Con: Integration into rendering process is not intuitive as separate index registration out of the
 parser needs to be implemented. Adding new PlaceHolder tags will then not be covered in case magic is
 not applied to them.

==> Choosing solution 1 as it provides sufficient speed increase and nice API.


2016-03-12 14:58

administrator   ~0000685

PoC code can be taken from the following URLs:

- Solution 1:
- Solution 2:


2016-03-12 16:56

administrator   ~0000686

Implementation done. See changes on

Issue History

Date Modified Username Field Change
2016-03-12 13:14 ChristianAchatz New Issue
2016-03-12 13:14 ChristianAchatz Status new => assigned
2016-03-12 13:14 ChristianAchatz Assigned To => ChristianAchatz
2016-03-12 13:42 ChristianAchatz Note Added: 0000683
2016-03-12 14:55 ChristianAchatz Note Added: 0000684
2016-03-12 14:55 ChristianAchatz Note Edited: 0000683 View Revisions
2016-03-12 14:58 ChristianAchatz Note Added: 0000685
2016-03-12 16:56 ChristianAchatz Note Added: 0000686
2016-03-12 16:56 ChristianAchatz Status assigned => resolved
2016-03-12 16:56 ChristianAchatz Fixed in Version => 3.2
2016-03-12 16:56 ChristianAchatz Resolution open => fixed