View Issue Details

IDProjectCategoryView StatusLast Update
0000143Adventure PHP FrameworkNeues Feature // New Featurepublic2015-10-12 12:19
ReporterChristianAchatzAssigned ToChristianAchatz 
PriorityhighSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version2.1 
Target Version3.0Fixed in Version3.0 
Summary0000143: POC: APF parser should be added full XML parser capability
DescriptionAt present, the APF parser suffers one big weakness of not parsing XML structures according to their appearance and thus the natural nesting within a document but with respect to the known tags list' order.

This leads to the fact that some cases of nesting tags cannot be used and this unfortunately handicaps re-use of tags or tag declarations.

Example:
========

<fs:required-user-group group="all">
   <fs:importdesign namespace="VENDOR\xyz" template="foo">
      <fs:content name="key1">Content one</fs:content>
      <fs:content name="key2">
         <fs:required-user-group group="all">
            This is content that is not rendered correctly.
         </fs:required-user-group>
      </fs:content>
   </fs:importdesign>
</fs:required-user-group>

Since either <fs:required-user-group /> or <fs:importdesign /> is parsed first, the <fs:importdesign /> or the two <fs:required-user-group /> are not assigned to the correct level of hierarchy.

Within this issue a POC for a full-featured implementation of the APF parser should be created along with an analysis whether all known mechanisms still can be used (e.g. form filtering and validation relies on explicit parsing orders).
TagsNo tags attached.
Codereferenz: ([Datei]:[Zeile])
Namespacecore

Relationships

child of 0000183 closedChristianAchatz Introduce new APF parser 

Activities

ChristianAchatz

2014-02-16 08:17

administrator   ~0000218

Last edited: 2014-03-02 16:55

View 3 revisions

First draft of functional POC finished. Current problems:

- Dynamically appending tags (currently known as <*:addtaglib />) is not supported. Hence, more engeneering work or parser redesign necessary (severity: high!).
- Performance results not satisfying (severity: medium; around 10-20% slower results).

Functional implementation and performance tests ongoing.

ChristianAchatz

2014-03-02 00:57

administrator   ~0000239

Achieved goal today to let implementation be as fast as the original parser written for the 1.X code line.

ChristianAchatz

2014-03-02 16:52

administrator   ~0000240

Last edited: 2014-03-02 17:42

View 4 revisions

Performance tests done. These are the implementation variants:

1) Old (1.17/2.0): run through document using the list of known tags.
2) New (2.2-parser-poc): step into document, search for first APF tag and then for symmetric structure.
3) Equal to 2) but with known tags maintained as associative array instead of an TagLib[] array:

$this->tagLibs['core:addtaglib'] = 'APF\core\pagecontroller\AddTaglibTag';


Benchmark results attached as *.ods file.

No longer considered:
4) Old implementation with additional re-sorting and hierarchy calculation (resons: far to slow!)

CONCLUSION:
Extensive performance tests show that no. 2 combines both good performance (compared to no. 1: around 1-2% slower but up to 13% less memory consumption!) as well as minimal change effort migrating to the new version.
Thus, option no. 2 will be chosen to be integrated in 2.2!

IMPORTANT NOTE:
Parser changes may break functionality, since tags are now analyzed according to their document position and no longer by the order of the known tags list. Thus, further functional tests necessary.

ChristianAchatz

2014-03-02 17:45

administrator   ~0000241

Thoughts on trim() replacement: http://maettig.com/code/php/php-performance-benchmarks.php

==> Rather not replace trim by preg_replace() ;)

ChristianAchatz

2014-03-04 17:49

administrator   ~0000254

Added tag ib class cache after further tests. Functional tests for form handling outstanding.

ChristianAchatz

2014-03-04 19:10

administrator   ~0000255

Form handling tests done. The only issue with forms is the order of filering and validation. With the new parser, you MUST take care that <form:addfilter /> is placed before <form:addvalidator />. Everything else is working fine.

ChristianAchatz

2014-03-14 22:21

administrator   ~0000267

Closing this issue since all testing done. Documentation needs to be updated on form handling.

Issue History

Date Modified Username Field Change
2014-02-06 23:22 ChristianAchatz New Issue
2014-02-06 23:22 ChristianAchatz Status new => assigned
2014-02-06 23:22 ChristianAchatz Assigned To => ChristianAchatz
2014-02-16 08:17 ChristianAchatz Note Added: 0000218
2014-02-16 17:57 ChristianAchatz Note Edited: 0000218 View Revisions
2014-03-02 00:57 ChristianAchatz Note Added: 0000239
2014-03-02 16:52 ChristianAchatz Note Added: 0000240
2014-03-02 16:54 ChristianAchatz Note Edited: 0000240 View Revisions
2014-03-02 16:54 ChristianAchatz Note Edited: 0000240 View Revisions
2014-03-02 16:55 ChristianAchatz Note Edited: 0000218 View Revisions
2014-03-02 17:42 ChristianAchatz Note Edited: 0000240 View Revisions
2014-03-02 17:45 ChristianAchatz Note Added: 0000241
2014-03-04 17:49 ChristianAchatz Note Added: 0000254
2014-03-04 19:10 ChristianAchatz Note Added: 0000255
2014-03-14 22:21 ChristianAchatz Note Added: 0000267
2014-03-14 22:21 ChristianAchatz Status assigned => resolved
2014-03-14 22:21 ChristianAchatz Fixed in Version => 3.0
2014-03-14 22:21 ChristianAchatz Resolution open => fixed
2014-04-01 23:34 ChristianAchatz Issue cloned: 0000183
2014-04-01 23:34 ChristianAchatz Relationship added child of 0000183
2015-10-12 12:19 ChristianAchatz Status resolved => closed