sunnyhub / thrift-protobuf-compare

Automatically exported from code.google.com/p/thrift-protobuf-compare
0 stars 0 forks source link

Avro should reuse DatumReader and DatumWriter instances #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Avro, the DatumReader and DatumWriter implementations have no internal
state and are expected to be reused, potentially shared by many threads. 
SpecificDatumReader in particular is currently expensive to create
(although that could be improved in Avro).  The attached patch vastly
improves avro-specific times, and is a better example of typical Avro usage.

After this simple patch, I see:

avro-generic            ,      5528.11364,      6779.77250,     
5587.13150,     17895.01764,        211
avro-specific           ,      4073.22960,      4960.44250,     
4712.67500,     13746.34710,        211
protobuf                ,      1753.46137,     12065.28600,     
7595.99600,     21414.74337,        217
thrift                  ,      1648.36542,      8599.77650,    
11522.16550,     21770.30742,        314

Original issue reported on code.google.com by cutt...@gmail.com on 29 May 2009 at 11:24

Attachments:

GoogleCodeExporter commented 8 years ago
I committed this. Thanks Doug!

Original comment by sharad.p...@gmail.com on 30 May 2009 at 11:57