<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi All,</p>
<p> Important note I forgot to mention, replacing old cookcc based
parser</p>
<p>introduces API incompatibility, because JSONParser, Parser and
JSONParserImpl</p>
<p>were public classes in DMR 1.3.0.Final.</p>
<p> I optimized DOM API write process in 'compact' mode as
mentioned in previous mail.<br>
</p>
Finally attached are up2date benchmarks against PR [1].
<p>DMR 1.4.0.Beta is faster on all benchmarks comparing to DMR
1.3.0.Final.<br>
</p>
<p>Concretely: <br>
</p>
<p> * Writing small DMR structures in DMR format is 1,3 times faster
with DOM API
<br>
* Writing small DMR structures in JSON format is 1,4 times faster
with DOM API
<br>
* Writing small DMR structures in DMR format is 2,5 times faster
with streaming API
<br>
* Writing small DMR structures in JSON format is 2,6 times faster
with streaming API
<br>
* Reading small DMR structures in DMR format is 4 times faster
with DOM API
<br>
* Reading small DMR structures in JSON format is 3,7 times faster
with DOM API
<br>
* Reading small DMR structures in DMR format is 4,9 times faster
with Streaming API
<br>
* Reading small DMR structures in JSON format is 4,4 times faster
with Streaming API <br>
</p>
<p> * Reading big DMR documents in DMR format is 5,7 times faster
with DOM API
<br>
* Reading big DMR documents in JSON format is 6,4 times faster
with DOM API
<br>
* Reading big DMR documents in DMR format is 7,4 times faster
with Streaming API
<br>
* Reading big DMR documents in JSON format is 8,8 times faster
with Streaming API
</p>
[1] <a class="moz-txt-link-freetext" href="https://github.com/jbossas/jboss-dmr/pull/20">https://github.com/jbossas/jboss-dmr/pull/20</a><br>
<br>
<div class="moz-cite-prefix">On 06/13/2016 11:48 PM, Richard Opalka
wrote:<br>
</div>
<blockquote
cite="mid:22be16c2-a5af-2737-43dd-b58059af1228@redhat.com"
type="cite">Hi All,
<br>
<br>
The upcoming DMR 1.4.0 version will introduce DMR Streaming API
[1] - see attachment.
<br>
<br>
The idea of this new feature grew up while I was working on DMR-9
issue [2].
<br>
<br>
In short the news in upcoming JBoss DMR 1.4.0 are:
<br>
* it will be compilable on JDK8 and above
<br>
* it will be 100% backward compatible on binary level with
previous version
<br>
* it replaces old cookcc based parser with new one based on DMR
Streaming API
<br>
* DMR parsing will be times faster with old model based API
<br>
* new DMR streaming API is highly memory efficient and really
very fast
<br>
<br>
One example on how to use new DMR streaming API can be seen here
[3].
<br>
<br>
I believe this new DMR Streaming API will become very handy for
many of us
<br>
because it opens new opportunities to decrease memory and CPU
usage in our core.
<br>
<br>
At the moment in current prototype [4] I didn't touch DMR object
model writing yet
<br>
because new DMR Streaming API does not (and most probably will
not) support pretty print feature
<br>
(because of its focus on speed and efficiency).
<br>
But I'm considering I might fix the object model writing flow when
pretty print is off.
<br>
Fixing it would speed it up significantly. Any objections?
<br>
<br>
As a final note today I run few benchmarks (see attachments).
<br>
Here are some outcomes from benchmark results in short:
<br>
* Writing small DMR structures in DMR format is 2,4 times faster
with new DMR streaming API
<br>
* Writing small DMR structures in JSON format is 2,6 times faster
with new DMR streaming API
<br>
* Reading small DMR structures in DMR format is 3,9 times faster
with old DMR object model API
<br>
* Reading small DMR structures in JSON format is 3,7 times faster
with old DMR object model API
<br>
* Reading small DMR structures in DMR format is 5 times faster
with new DMR streaming API
<br>
* Reading small DMR structures in JSON format is 4,4 times faster
with new DMR streaming API
<br>
* Reading big DMR structures in DMR format is 5,2 times faster
with old DMR object model API
<br>
* Reading big DMR structures in JSON format is 6 times faster
with old DMR object model API
<br>
* Reading big DMR structures in DMR format is 7,6 times faster
with new DMR streaming API
<br>
* Reading big DMR structures in JSON format is 8,8 times faster
with new DMR streaming API
<br>
<br>
PS: Hopefully new DMR streaming API will seamlessly integrate with
GWT (used in our console).
<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://github.com/ropalka/jboss-dmr/tree/DMR-9/src/main/java/org/jboss/dmr/stream">https://github.com/ropalka/jboss-dmr/tree/DMR-9/src/main/java/org/jboss/dmr/stream</a><br>
[2] <a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/DMR-9">https://issues.jboss.org/browse/DMR-9</a>
<br>
[3]
<a class="moz-txt-link-freetext" href="https://github.com/ropalka/jboss-dmr/blob/DMR-9/src/main/java/org/jboss/dmr/ModelNodeFactory.java">https://github.com/ropalka/jboss-dmr/blob/DMR-9/src/main/java/org/jboss/dmr/ModelNodeFactory.java</a><br>
[4] <a class="moz-txt-link-freetext" href="https://github.com/ropalka/jboss-dmr/commits/DMR-9">https://github.com/ropalka/jboss-dmr/commits/DMR-9</a>
<br>
<br>
Regards,
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
wildfly-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/wildfly-dev">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Richard Opalka
Principal Software Engineer
JBoss by Red Hat
Mobile: +420 731 186 942
</pre>
</body>
</html>