8.4. Performance over Java serialization

8.4. Performance over Java serialization

To achieve the performance and efficiency gains, the TreeCacheMarshaller uses a number of techniques including method ids for known methods and magic numbers for known internal class types which drastically reduces the size of calls to remote caches, greatly improving throughput and reducing the overhead of Java serialization.

To make things even faster, the TreeCacheMarshaller uses JBoss Serialization, a highly efficient drop-in replacement for Java serialization for user-defined classes. JBoss Serialization is enabled and always used by default, although this can be disabled, causing the marshalling of user-defined classes to revert to Java serialization. JBoss Serialization is disabled by passing in the -Dserialization.jboss=false environment variable into your JVM.