Trying to avoid / cache buffer allocation when serializing object

Jan jan.bumbala at gmail.com
Mon Nov 22 09:00:03 EST 2010


IMHO the buffer instance pooling is not necessary. In modern jvm, the
allocation is very cheap, so is the garbage collectioning if generational GC
is used (we can assume that buffers are short living objects that stay in
young generation).  

nice article from Brian Goetz:
http://www.ibm.com/developerworks/java/library/j-jtp09275.html

Of course the only way to make sure is implement your ideas and make some
profiling/benchmarking. But I would expect that concurrency costs overweight
the allocation/GC costs in this case (cache synchronization, cache miss,
problems with pool sizing...).

cheers
Jan
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Trying-to-avoid-cache-buffer-allocation-when-serializing-object-tp5465132p5762729.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list