You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/01/11 12:31:18 UTC

[GitHub] stevedlawrence opened a new pull request #163: Fix performance issues with recent hexBinary changes

stevedlawrence opened a new pull request #163: Fix performance issues with recent hexBinary changes
URL: https://github.com/apache/incubator-daffodil/pull/163
 
 
   Commit af489bc6ea modified the behavior of hexBinary parsing to
   effectively ignore byteOrder. It did this by no longer using the
   getByteArray/putByteArray methods, but instead read/wrote 8 bits at a
   time until the size of the array was reached. This gave the the correct
   behavior, but resulted in a noticable performance degredation, in some
   case around 40% decrease in performance.
   
   To fix this, this patch reverts that change and instead uses the
   getByteArray/putByteArray methods, which are now modified to retrive
   bytes in an efficient manner and return a byte array consistent with
   what xs:hexBinary data should look like. Functions that relied on the
   old behavior of getByteArray/putByteArray, such as longs and bigInts,
   are also updated to account for the changes.
   
   The IO layer is modified to assume the byteOrder is bigEndian when the
   type is hexBinary, which achives the expected output.
   
   This change brings the performance back up to before commit af489bc6ea.
   
   DAFFODIL-2045

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services