GitHub user mbeckerle opened a pull request:
https://github.com/apache/incubator-daffodil/pull/12
Revised daffodil-io module to require passing in a FormatInfo object.
Not expect this to get approved without substantial revisions.
This is another large patch set - many files are touched.
This is just one part in addressing this major issue of daffodil
schema compiler slowness/speed.
It should also fix DAFFODIL-1843
The FormatInfo object is used to obtain the very commonly used format
properties like byteOrder, bitOrder, etc. This eliminates the need to
call setters that set these properties, eliminates the need to
save/restore them on backtracking, and when evaluating unparser
suspensions. Instead, the daffodil runtime just passes an object
(the PState/UState) which contains this information - getting it from
the ERD of an element most likely, or if runtime defined, from an
Evaluatable object which caches the property value on the infoset
element.
Once incorporated into daffodil, this will facilitate elimination of
most of the "change" processors (e.g., EncodingChangeParser,
ByteOrderChangeParser) the insertion of which uses compile-time
context-upward analysis.
There is some overhead in this change - performance impact will have to
be measured. It should reduce backtracking overheads to compensate
perhaps.
DAFFODIL-1444, DAFFODIL-1843
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mbeckerle/incubator-daffodil
daffodil-1444-schema-compiler
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-daffodil/pull/12.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12
----
commit 79e9ee5648d43cbb8980484ea7fb5681b98b9731
Author: Mike Beckerle <[email protected]>
Date: 2017-05-31T13:44:57Z
Revised daffodil-io module to require passing in a FormatInfo object.
This is just one part in addressing this major issue of daffodil
schema compiler slowness/speed.
It should also fix DAFFODIL-1843
The FormatInfo object is used to obtain the very commonly used format
properties like byteOrder, bitOrder, etc. This eliminates the need to
call setters that set these properties, eliminates the need to
save/restore them on backtracking, and when evaluating unparser
suspensions. Instead, the daffodil runtime just passes an object
(the PState/UState) which contains this information - getting it from
the ERD of an element most likely, or if runtime defined, from an
Evaluatable object which caches the property value on the infoset
element.
Once incorporated into daffodil, this will facilitate elimination of
most of the "change" processors (e.g., EncodingChangeParser,
ByteOrderChangeParser) the insertion of which uses compile-time
context-upward analysis.
There is some overhead in this change - performance impact will have to
be measured. It should reduce backtracking overheads to compensate
perhaps.
DAFFODIL-1444, DAFFODIL-1843
----
---