Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] A task for IO-optimizing hobbyists for Jayes (com.sun.Unsafe vs Java Serialization)

Hi recommenders-dev,


as some of you know, we use plain Java Serialization to load our Bayesian networks from zip files. This solution is slow (loading a model takes up to 150ms) and our users recognize this delay when triggering code completion on a type the first time. I tried several frameworks to improve the performance of the network deserialization but non of them actually was significantly faster or even slower than Java's built-in deserialization (recently I tried Google Protobuf). So I gave up on this task for quite some time now.

But two days ago I read two articles about how to improve deserialization performance with your own object (de-)serialization using ByteBuffers and com.sun.Unsafe. The performance improvements compared to Java's built-in deserialization were *very* impressive and now I can't get rid of the idea to implement our own (de)serialization for Jayes. Unfortunately, I'm short of time in the next three weeks but I hoped that maybe someone on the list has some interest in performance optimizations and would be willing to look into this?

The two articles are here [1, 2]. The classes to serialize are /org.eclipse.recommenders.jayes/src/org/eclipse/recommenders/jayes/BayesNet.java and /org.eclipse.recommenders.jayes/src/org/eclipse/recommenders/jayes/BayesNode.java. Please let me know if you would like to volunteer on this. I think it would be a huge improvement to Jayes and Code Recommenders.


Best,
Marcel

[1] http://java-persistence-performance.blogspot.de/2013/08/optimizing-java-serialization-java-vs.html
[2] http://mechanical-sympathy.blogspot.jp/2012/07/native-cc-like-performance-for-java.html




Back to the top