1) Locate the slowest part during the serializtion
2) Optimize that part until
a. It’s not the slowest part
b. You can’t optimize it anymore.
Repeat until *specific* problem of speed is no longer a problem.
Just so you’ll know that we (I) don’t understand your question.
Lior Friedman
Blog - http://imistaken.blogspot.com
Hi Ariel,
At the risk of being very annoying.
Is there a possibility that your chasing your tail in the wrong direction?
(Roy is going to love this)
The original question was “How can I optimize serialize/deserialize?”
1) Why do you want to optimize them?
Answer: cause I’m preloading a cache and it’s not fast enough
2) Why are you preloading the cache?
Answer: Cause creating the cache in run time is too long.
3) Why are you creating a cache?
Answer: Cause some of the objects are the same for every run.
4) Why not create them at runtime?
Answer: (pure assumption) creating them in runtime takes too long.
Possible solution:
Optimize the creation of your object to the point it becomes a non-issue to create them at runtime.
Now I assume you went through all this and the actual object creation is completely optimized, and still it’s too slow, and you need to preload the cache.
If I were you I would start by analyzing which parts of the object tree is causing you grief. It might be that you only need to optimize only some of the classes you are using.
Also this sounds a lot like something that in memory object model data base might solve.
Lior