[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Strings Experiments...

timfox do-not-reply at jboss.com
Fri Feb 20 06:20:09 EST 2009


Removing the + i gives:


  | spentTime UTF = 3696
  | spentTime UTF = 3587
  | spentTime UTF = 3699
  | spentTime UTF = 3672
  | spentTime UTF = 3806
  | spentTime PutSimpleString = 161
  | spentTime PutSimpleString = 142
  | spentTime PutSimpleString = 133
  | spentTime PutSimpleString = 148
  | spentTime PutSimpleString = 135
  | spentTime putString = 2972
  | spentTime putString = 2922
  | spentTime putString = 2967
  | spentTime putString = 2942
  | spentTime putString = 2905
  | spentTime putStringNewWay = 974
  | spentTime putStringNewWay = 937
  | spentTime putStringNewWay = 977
  | spentTime putStringNewWay = 955
  | spentTime putStringNewWay = 960
  | 

I also remove putNewString() since I didn't see the point of that.

Also you need to test the perf of reading. There's no point writing stuff you never read!

The point that putString is slower than putting the shorts in one by one, implies to me that the overhead is in the Netty ChannelBufferWrapper implementation.

If you look at the Netty ChannelBufferWrapper implementations you will see they do a lot of stuff on every put. So we need to minimise the amount of puts.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211759#4211759

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211759



More information about the jboss-dev-forums mailing list