Hello.
I was playing with my file system classes, and was thinking on a way to potentially enhance the memory use of those classes.
They store entries, that are files - or whatever- in a fliesystem. As those entries are cached, they might be taken out of Eden and stored as longer life object. Up to here, nothing abnormal.
Now, here is what i thought… When i refresh my cache, my first implementation was to clear the list, read the new one, and return. Simple, efficient… efficient? mhh. maybe not. What if i compared the new cached data of a directory to the old one, and only replace the ones that changed… You might think “hey, you’ve already allocated the new objects… what’s the use for throwing them away, and use more cpu for nothing?”… yes, right… why would i do that?
Well. if those new objects are in Eden, they will be collected sooner than those that are long lived, so my memory use should decrease sooner, and GC should take less time (but should occur sooner).
So… where is the final question…what do you guys think… is this worth the effort?
I’m not sure escape analysis would help some more to reduce garbage on that case, but that would be nice. Do you think that it will? why?
Mhh som many questions, and my tomcat is still not linked ajp13 with apache… damn… i hate them when they need to work toguether… :’(