<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-24611184.post48317931780888923..comments</id><updated>2010-02-11T14:20:39.865-08:00</updated><category term='xml'/><category term='scala'/><category term='podcast'/><category term='StAX'/><category term='java'/><category term='programming'/><category term='jdo'/><category term='socialnetworks'/><category term='gwt'/><category term='monitoring'/><category term='open source'/><category term='Thrift'/><category term='linkedin'/><category term='javaposse'/><category term='protobuf'/><category term='Google App Engine'/><category term='test'/><category term='guic'/><category term='guice'/><category term='ibm'/><category term='groovy'/><category term='spring'/><category term='twitter'/><category term='OHF'/><category term='Eclipse'/><category term='Mac'/><category term='voldemort'/><category term='kaching'/><category term='testing'/><category term='j2ee'/><category term='work'/><category term='conferences'/><category term='xstream'/><category term='json'/><category term='Books'/><title type='text'>Comments on Wondering around: Protobuf with option optimize for SPEED</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.eishay.com/feeds/48317931780888923/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html'/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/S44K61181wI/AAAAAAAAAj0/oYGO2xz_kf4/S220/eishay.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24611184.post-3662414999338800191</id><published>2009-03-17T10:28:00.000-07:00</published><updated>2009-03-17T10:28:00.000-07:00</updated><title type='text'>Neat. One minor thing we could add is name of impl...</title><content type='html'>Neat. One minor thing we could add is name of impl used (for stax, json). I can do that.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/3662414999338800191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/3662414999338800191'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1237310880000#c3662414999338800191' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-4993922443005821463</id><published>2009-03-17T09:28:00.000-07:00</published><updated>2009-03-17T09:28:00.000-07:00</updated><title type='text'>Thanks David!&lt;br&gt;If you'll send your gmail account...</title><content type='html'>Thanks David!&lt;BR/&gt;If you'll send your gmail account to eishay[at]gmail.com I'll give you svn write access.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/4993922443005821463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/4993922443005821463'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1237307280000#c4993922443005821463' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-2724806429541250887</id><published>2009-03-17T06:38:00.000-07:00</published><updated>2009-03-17T06:38:00.000-07:00</updated><title type='text'>Hi,&lt;br&gt;&lt;br&gt;I added (I could send the patch)&lt;br&gt;* x...</title><content type='html'>Hi,&lt;BR/&gt;&lt;BR/&gt;I added (I could send the patch)&lt;BR/&gt;* xstream (default conf)&lt;BR/&gt;* xstream with dedicated converter (like protobuf, and other already have)&lt;BR/&gt;&lt;BR/&gt;And because every sample have dedicated converter/mapping rules, I think it's important to also provide them for java serialization so I added "Externalizable"&lt;BR/&gt;&lt;BR/&gt;                              ,   Object create,    Serializaton, Deserialization, Serilized Size&lt;BR/&gt;java                          ,       113.23390,     17305.80500,     72637.29300,        845&lt;BR/&gt;xstream default               ,       116.40035,    119932.61000,    171796.68850,        931&lt;BR/&gt;json                          ,       112.58555,      3324.76450,      5318.12600,        310&lt;BR/&gt;stax                          ,       113.05025,      6172.06000,      9566.96200,        406&lt;BR/&gt;java (externalizable)         ,        99.76580,      6250.40100,     18970.58100,        315&lt;BR/&gt;thrift                        ,       174.72665,      4635.35750,      5133.24450,        314&lt;BR/&gt;scala                         ,        66.10890,     27047.10850,    155413.44000,       1473&lt;BR/&gt;protobuf                      ,       250.37140,      3849.69050,      2416.94800,        217&lt;BR/&gt;xstream with conv             ,       115.22810,     13492.50250,     47056.58750,        321</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2724806429541250887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2724806429541250887'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1237297080000#c2724806429541250887' title=''/><author><name>David Bernard</name><uri>http://www.blogger.com/profile/10258681071629942075</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_zvTlTj2t3eU/R2Aw8WB_rII/AAAAAAAAAAM/FeLAs-Iclas/S220/wyvern-tux-dredd.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1451322799'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-1198284103258954314</id><published>2009-03-13T16:39:00.000-07:00</published><updated>2009-03-13T16:39:00.000-07:00</updated><title type='text'>It is possible to run 3 separate ones, just need t...</title><content type='html'>It is possible to run 3 separate ones, just need to force specific factories to use for each. Could just pass input/output factory classes or instances to serializer constructor.&lt;BR/&gt;&lt;BR/&gt;Cool to have json serializer(s) as well.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/1198284103258954314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/1198284103258954314'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236987540000#c1198284103258954314' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-2815923036060500026</id><published>2009-03-13T16:14:00.000-07:00</published><updated>2009-03-13T16:14:00.000-07:00</updated><title type='text'>Thanks cowtowncoder. Fyi, I added Chris to the com...</title><content type='html'>Thanks cowtowncoder. Fyi, I added Chris to the commiters list. He adds a json serializer to the benchmark. Is there a problem running serializers for the three stax implementations we talked about, all with the same jvm? Would be nice to compare them. Running is separate might not do them justice.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2815923036060500026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2815923036060500026'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236986040000#c2815923036060500026' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-3189500244651253774</id><published>2009-03-13T13:48:00.000-07:00</published><updated>2009-03-13T13:48:00.000-07:00</updated><title type='text'>Done. Code should be up to date, might be easier t...</title><content type='html'>Done. Code should be up to date, might be easier to run too (added build.xml, wrapper script). In case anyone wants to (re-)run results. :-)&lt;BR/&gt;&lt;BR/&gt;(Stax numbers are radically different after change)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/3189500244651253774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/3189500244651253774'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236977280000#c3189500244651253774' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-5993414169064562989</id><published>2009-03-11T10:03:00.000-07:00</published><updated>2009-03-11T10:03:00.000-07:00</updated><title type='text'>Thanks!&lt;br&gt;Send your gmail address to eishay [at] ...</title><content type='html'>Thanks!&lt;BR/&gt;Send your gmail address to eishay [at] gmail.com and I'll give you write access</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/5993414169064562989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/5993414169064562989'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236790980000#c5993414169064562989' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-179911432432674450</id><published>2009-03-11T09:59:00.000-07:00</published><updated>2009-03-11T09:59:00.000-07:00</updated><title type='text'>No problem: changes were really small.&lt;br&gt;I can se...</title><content type='html'>No problem: changes were really small.&lt;BR/&gt;I can send diffs from home, or submit (can't read it right now).&lt;BR/&gt;&lt;BR/&gt;But quick summary is:&lt;BR/&gt;&lt;BR/&gt;- Add member fields for XMLInputFactory&lt;BR/&gt;- Assign on constructor, using XMLxxxFactory.newInstance&lt;BR/&gt;- Use this factory to create reader/writer&lt;BR/&gt;- After deserialization, call parser.close()&lt;BR/&gt;&lt;BR/&gt;No changes are needed to switch Stax implementation, just add in jars (woodstox 4 needs core, stax2-api; aalto similarly its own and stax2-api).&lt;BR/&gt;I did add debug statements to verify correct factories are used.&lt;BR/&gt;&lt;BR/&gt;Also I could submit Ant build.xml, just wrote a really simple one. I hope I can use my gmail account with google-code?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/179911432432674450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/179911432432674450'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236790740000#c179911432432674450' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-1895396888718934280</id><published>2009-03-10T23:37:00.000-07:00</published><updated>2009-03-10T23:37:00.000-07:00</updated><title type='text'>Wow, that's great! We do use Woodstox in few place...</title><content type='html'>Wow, that's great! We do use Woodstox in few place, I'll definitely check out Aalto to replace it.&lt;BR/&gt;Would you mind sharing the code? You can send a patch or I can give you svn access if you'll want to extend it even more.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/1895396888718934280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/1895396888718934280'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236753420000#c1895396888718934280' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-4239059460203132971</id><published>2009-03-10T23:11:00.000-07:00</published><updated>2009-03-10T23:11:00.000-07:00</updated><title type='text'>Gotcha. Just for fun I did compile the code, repla...</title><content type='html'>Gotcha. Just for fun I did compile the code, replaced stax-RI with Woodstox, and changed factory instantiation.&lt;BR/&gt;Turns out this decreased Stax numbers by factor of 10 (!) for serialization, and 7 for deserialization.&lt;BR/&gt;After this the only other thing I added was "parser.close()" after parsing, which increased throughput by 50% (closing of readers/writers allows for releasing and reusing resources).&lt;BR/&gt;And if one uses Aalto, numbers change a bit more (see below), downwards.&lt;BR/&gt;&lt;BR/&gt;So I am not trying to change your mind on choice, I just hope that readers will get a reasonable understanding of relative speeds -- with all the modifications, PB is still a bit faster for deserialization than Thrift or XML/Stax.&lt;BR/&gt;And obviously produces compact data.&lt;BR/&gt;&lt;BR/&gt;For what it's worth, here are numbers I got on my system:&lt;BR/&gt;&lt;BR/&gt;---&lt;BR/&gt;using Woodstox as Stax impl:&lt;BR/&gt;&lt;BR/&gt;warming up...&lt;BR/&gt;Starting&lt;BR/&gt; ,Object create, Serializaton, Deserialization, Serilized Size&lt;BR/&gt;thrift, 1295.77960, 23697.43200, 22989.80000, 314&lt;BR/&gt;stax, 996.85880, 31536.41900, 41365.32500, 406&lt;BR/&gt;protobuf, 2033.16400, 26118.13100, 15469.00900, 217&lt;BR/&gt;java, 975.85050, 76045.71900, 259198.09900, 845&lt;BR/&gt;scala, 652.98820, 118169.24200, 547530.91400, 1473&lt;BR/&gt;&lt;BR/&gt;using Aalto as Stax impl:&lt;BR/&gt;&lt;BR/&gt;warming up...&lt;BR/&gt;Starting&lt;BR/&gt; ,Object create, Serializaton, Deserialization, Serilized Size&lt;BR/&gt;thrift, 1304.13260, 23069.41900, 24145.53400, 314&lt;BR/&gt;protobuf, 2081.43830, 26319.83200, 15060.01900, 217&lt;BR/&gt;java, 973.97880, 75996.27200, 260578.72200, 845&lt;BR/&gt;scala, 655.33490, 118616.22600, 548926.90300, 1473&lt;BR/&gt;stax, 1003.50770, 17027.86700, 27728.39200, 406</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/4239059460203132971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/4239059460203132971'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236751860000#c4239059460203132971' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-9103567213795038654</id><published>2009-03-10T22:52:00.000-07:00</published><updated>2009-03-10T22:52:00.000-07:00</updated><title type='text'>Code for thrift is actually there under the &lt;a hre...</title><content type='html'>Code for thrift is actually there under the &lt;A HREF="http://code.google.com/p/thrift-protobuf-compare/source/browse/#svn/trunk/tpc/gen-javabean/serializers/thrift" REL="nofollow"&gt;gen-javabean&lt;/A&gt;. I left it there and not under src since the thrift compiler (unlike protobuf) does not let you choose the destination directory of the generated code. Ok, I could have written a small script that copies the files but its ugly and another con for thrift.&lt;BR/&gt;I agree about the factory code, its not fair. I see that &lt;A HREF="http://www.docjar.com/html/api/javax/xml/stream/FactoryFinder.java.html" REL="nofollow"&gt; FactoryFinder&lt;/A&gt; does use some cache but only for configurations, definitely not as I expected it to. I might do another iteration on the benchmarking, but I already made the decision the original one was made for (i.e. using protobuf).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/9103567213795038654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/9103567213795038654'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236750720000#c9103567213795038654' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-2743920064713549638</id><published>2009-03-10T22:10:00.000-07:00</published><updated>2009-03-10T22:10:00.000-07:00</updated><title type='text'>Ok. :-)&lt;br&gt;&lt;br&gt;One quick comment on code for StaxS...</title><content type='html'>Ok. :-)&lt;BR/&gt;&lt;BR/&gt;One quick comment on code for StaxSerializer: code looks good, but one very expensive thing there is the call to XMLInputFactory.newInstance() (and XMLOutputFactory.newInstance()): this because they do extensive class-path based introspection. Construction of the factories themselves is not expensive, it's just the dynamic discovery part. Same problem occurs with JAXP API when creating DOM and SAX parsers too.&lt;BR/&gt;Simplest thing to do is to just create input and output factory in constructor.&lt;BR/&gt;&lt;BR/&gt;Anyway, otherwise test is probably quite fair, but I mention this because I happened to notice on one system I built, profiler pointed to it as using more than half of the time for xml processing.&lt;BR/&gt;&lt;BR/&gt;Code for Thrift should be useful, I have some performance tests and have been thinking of including Thrift along with PB.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2743920064713549638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2743920064713549638'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236748200000#c2743920064713549638' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-2726146884451096561</id><published>2009-03-10T21:09:00.000-07:00</published><updated>2009-03-10T21:09:00.000-07:00</updated><title type='text'>I looked again on the benchmark and it appears tha...</title><content type='html'>I looked again on the benchmark and it appears that I did after all used the reference implementation (sorry). The &lt;A HREF="http://code.google.com/p/thrift-protobuf-compare/source/browse/#svn/trunk/tpc/src/serializers" REL="nofollow"&gt;benchmark code is here&lt;/A&gt; and it includes protobuf, pojo, scala, thrift and stax (&lt;A HREF="http://www.eishay.com/2008/11/java-stax-protobuf-and-thrift.html" REL="nofollow"&gt;more information in the original post&lt;/A&gt;). No json there, but if you wish you can extend it to include it and other stax implementation.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2726146884451096561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/2726146884451096561'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236744540000#c2726146884451096561' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-7933052780212572557</id><published>2009-03-10T19:44:00.000-07:00</published><updated>2009-03-10T19:44:00.000-07:00</updated><title type='text'>Ok thanks. I was mistaken then, just saw a link wa...</title><content type='html'>Ok thanks. I was mistaken then, just saw a link was to home page of ref impl and assumed that was the impl used.&lt;BR/&gt;Are sources for the test available? Differences are somewhat larger than what I have seen with other tests, so I am curios. Plus might be nice to see how json does and so on.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/7933052780212572557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/7933052780212572557'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236739440000#c7933052780212572557' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-564630322475603937</id><published>2009-03-10T18:38:00.000-07:00</published><updated>2009-03-10T18:38:00.000-07:00</updated><title type='text'>Used Woodstox for the benchmark.</title><content type='html'>Used Woodstox for the benchmark.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/564630322475603937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/564630322475603937'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236735480000#c564630322475603937' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/SSHEkczXfAI/AAAAAAAAAPg/DAa6AP088sE/S220/eishay_3_s.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-6313989772637920181</id><published>2009-03-10T18:15:00.000-07:00</published><updated>2009-03-10T18:15:00.000-07:00</updated><title type='text'>One thing to note: Stax reference implementation i...</title><content type='html'>One thing to note: Stax reference implementation is NOT a good Stax implementation. Mostly because it is buggy, but it is also not as fast as alternatives, such as:&lt;BR/&gt;&lt;BR/&gt;* Woodstox, [http://woodstox.codehaus.org[&lt;BR/&gt;* Sun sjsxp, [http://sjsxp.dev.java.net] (bundled with JDK 1.6)&lt;BR/&gt;* Aalto, [http://www.cowtowncoder.com/hatchery/aalto/index.html]&lt;BR/&gt;&lt;BR/&gt;Of these, Aalto is the fastest, then Woodstox then Sjsxp.&lt;BR/&gt;&lt;BR/&gt;So it would be nice to see how upgrading to a good stax implementation would change results for xml.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/6313989772637920181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/6313989772637920181'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1236734100000#c6313989772637920181' title=''/><author><name>cowtowncoder</name><uri>http://www.blogger.com/profile/02343617472112278520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325534603'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-7129445140052149962</id><published>2008-11-19T07:08:00.000-08:00</published><updated>2008-11-19T07:08:00.000-08:00</updated><title type='text'>Doh - ignore previous comment. I'd missed the extr...</title><content type='html'>Doh - ignore previous comment. I'd missed the extra line, and was still just looking at the protobuf one...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/7129445140052149962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/7129445140052149962'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1227107280000#c7129445140052149962' title=''/><author><name>Jon Skeet</name><uri>http://www.blogger.com/profile/09730219126872960482</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1719777736'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-9027242299890000756</id><published>2008-11-19T01:04:00.000-08:00</published><updated>2008-11-19T01:04:00.000-08:00</updated><title type='text'>As far as I can tell, this post is still using the...</title><content type='html'>As far as I can tell, this post is still using the same graphs as the previous one. Am I missing something, or is this a copy and paste error?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/9027242299890000756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/48317931780888923/comments/default/9027242299890000756'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html?showComment=1227085440000#c9027242299890000756' title=''/><author><name>Jon Skeet</name><uri>http://www.blogger.com/profile/09730219126872960482</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html' ref='tag:blogger.com,1999:blog-24611184.post-48317931780888923' source='http://www.blogger.com/feeds/24611184/posts/default/48317931780888923' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1719777736'/></entry></feed>
