[infinispan-dev] Optimising default cache access in Hot Rod

Mircea Markus mircea.markus at jboss.com
Wed Jun 9 07:37:28 EDT 2010


On 9 Jun 2010, at 10:13, galder at redhat.com wrote:

> Hi guys,
> 
> This came to my mind while sleeping.
You definitely over-geeked me!
> While I was profiling the Hot Rod server, I noticed that some time (3%) was being used reading the string cache name from the wire and transforming it to UTF-8. 
How much of the time is being used to convert the byte[] to utf 8 String? At least for writes we can use an cached byte[] rather than converting it each time.
> 
> Now, in the test I was acting against the default cache which we had established to be requests sent to "___defaultcache" would be considered to be directed to the default cache. However, I'm thinking that this is waste of space. We could make things even quicker when default cache is used by simply assuming that if the length of the String is 0, followed by nothing, then the default cache will be used. If a length other than 0 is passed, the String follows and we have to read it.
+1
> 
> WDYT?
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache




More information about the infinispan-dev mailing list