http://wiki3.caucho.com/index.php?title=Hessian2Output_Performance_Cookbook&feed=atom&action=historyHessian2Output Performance Cookbook - Revision history2024-03-29T11:23:47ZRevision history for this page on the wikiMediaWiki 1.18.0http://wiki3.caucho.com/index.php?title=Hessian2Output_Performance_Cookbook&diff=4391&oldid=prevFerg: New page: Category: Cookbook Category: Hessian Hessian's performance can be improved with a few basic use patterns. When your object graphs are acyclic (no shared objects or circular), you...2011-12-27T20:15:01Z<p>New page: <a href="/Category:Cookbook" title="Category:Cookbook">Category: Cookbook</a> <a href="/Category:Hessian" title="Category:Hessian">Category: Hessian</a> Hessian's performance can be improved with a few basic use patterns. When your object graphs are acyclic (no shared objects or circular), you...</p>
<p><b>New page</b></p><div>[[Category: Cookbook]] [[Category: Hessian]]<br />
<br />
Hessian's performance can be improved with a few basic use patterns.<br />
<br />
When your object graphs are acyclic (no shared objects or circular), you can save performance with the following pattern:<br />
<br />
private HessianFactory _hFactory = new HessianFactory();<br />
...<br />
OutputStream myOs = ...;<br />
<br />
Hessian2Output hOut = hFactory.createHessian2Output(myOs);<br />
hOut.setUnshared(true);<br />
<br />
hOut.writeObject(myObj);<br />
hOut.close();<br />
<br />
hFactory.freeHessian2Output(hOut);<br />
<br />
The setUnshared tells Hessian that none of the objects will be shared, which will save some HashMap lookups. Using the HessianFactory also saves time by saving the reflection information and also the Hessian2Output objects.</div>Ferg