Hi Ceki,<br><br>Keep in mind that I still have to double check my LoggingEvent-to-protobuf converter.<br><br>Serializing the corpus with different formats:<br>java serialization  => 16 MB (16108602)                           <br>
protobuf           => 33 MB (34385867 bytes)<br>protobuf + gzip     => 9.9 MB (10354646 bytes)<br>protbuf + deflater  => 12 MB (12006206 bytes)<br><br>speed:<br><br>java serialization:   4330 ms<br>protobuf                  928 ms <br>
protobuf + gzip      3146 ms <br>protobuf + deflater 1883 ms<br><br>So I would choose for protobuf + deflater : 25% smaller than java serilaization and twice as fast.<br><br>Deflater means using java.util.zip.Deflater.BEST_SPEED<br>
<br>regards,<br>Maarten<br><br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 9:49 PM, Ceki Gulcu <span dir="ltr"><ceki@qos.ch></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello Maarten,<br>
<br>
It's interesting to learn that protobuf is faster than plain old java serialization. Thanks.<br>
<br>
How about the size of the stored data? How many bytes does a logging event use on average?<br>
<br>
Maarten Bosteels wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
No objections at all.<br>
<br>
Looking at my .proto file it's indeed pretty obvious that CallerData and StackTraceElement are quite similar :-)<br>
<a href="http://code.google.com/p/firewood/source/browse/trunk/compare-formats/src/main/java/com/googlecode/firewood/protobuf/logging.proto" target="_blank">http://code.google.com/p/firewood/source/browse/trunk/compare-formats/src/main/java/com/googlecode/firewood/protobuf/logging.proto</a><br>
<br>
I've done some benchmarking with protobuf (using the Corpus), and it seems to be at least 4 times faster than Java serialization.<br>
Will soon post the results and the code.<br>
<br>
regards,<br>
Maarten<br>
<br>
</blockquote>
<br>
-- <br>
Ceki Gülcü<br>
Logback: The reliable, generic, fast and flexible logging framework for Java.<br>
<a href="http://logback.qos.ch" target="_blank">http://logback.qos.ch</a><br>
_______________________________________________<br>
logback-dev mailing list<br>
logback-dev@qos.ch<br>
<a href="http://qos.ch/mailman/listinfo/logback-dev" target="_blank">http://qos.ch/mailman/listinfo/logback-dev</a><br>
</blockquote></div><br>