![]() Please wait while updating issue type...
Could not save your changes
This issue has been changed since you started editing it
Data that has been changed is highlighted in red below. Undo your changes to see the updated information
You have changed this issue, but haven't saved your changes yet. To save it, press the Save changes button to the right
This issue is blocking the next release
![]() There are no comments
There is nothing attached to this issue
This issue has no duplicates
There are no code checkins for this issue |
|||||||||||||||||||||||||||||||||||
Really delete this comment?
Really delete this comment?
After multiple iterations of improvements on the JPPF serialization, I got the results below. Each iteration means serialization followed by desrialization of the reference object.
Unfortunately, I didn't keep the numbers I had before the optimization rounds, but for JPPF serialization if was in the order of 00:00:68.000 (68 seconds) for around 35,500 bytes. So a huge performance improvement - albeit not up tot he other serialization schemes - , but a poor resulting serialized size.
Then I tried with a different type of serialized data, a 300x300 square matrix object with random double values, where the values are stored in a double[][] array. Here's the result:
Here, performance and footprint are really on par. We can see that compression for this kind of data is mostly useless, due to the values being random.
In the next step, I will use an object graph mixing all kinds of data and see what happens.
Really delete this comment?
Really delete this comment?
Really delete this comment?
Really delete this comment?
Really delete this comment?
After more profiling, I realized that looking up the readObject(ObjectInputStream) and writeObject(ObjectOutputStream) for the serialized classes was very costly, essentially due to calls to Class.getDeclaredMethod(Class, Class...). It is in fact much more efficient to iterate over the array returned by Class.getDeclaredMethods(). Also, caching the corresponding Method objects (in a soft references map) results in a significant performance gain. Same for the fields of the serialized classes.
So now, I get the following performance results:
So, we're finally doing better than the JDK! But let's not cry victory. The above results are for tests that serialize a single, relatively large object at a each iteration. An implication of this is that the overhead of the serialization framework is diluted by the size of the data, which is mostly held in arrays that are easy and fast to serialize.
So instead, I tried testing with a different kind of data structure: basically something similar to what a JPPF client sends to a server when it submits a job: a job header + each task as a separate object graph. I made the tasks small and there are 300 of them, so at each iteration 301 objects are serialized and deserialized. Here are the results:
Yep, it's not pretty. That means more profiling, pooling, caching, refactoring etc...
Really delete this comment?
Really delete this comment?
Really delete this comment?