Hi,
Today, I've just sent a pull request for checking web sockets max frame payload length (See Issue #283).
The same changes were applied to both the 3 and master branch. In running the AutoBahn test suite (see instructions in io.netty.example.http.websocketx.autobahn.package-info), I've found that an AutoBahn tests sending 1000 messages to the 3 branch runs < 1 sec while the same test run against master takes 40 seconds.
Naturally, I' removed my changes and the results were the same: 3 branch runs < 1 sec while the same test run against master takes 40 seconds. So I am sure it is not the new code that I added.
I also did a test where I sent 1000 messages from the netty example web socket client to the example web socket server. The results were < 1 sec for both master and 3 branch. From this I think we can conclude that it is something to do with the interaction between AutoBahn (Python/Twisted) and Netty.
If I comment out the following lines in transport/src/main/java/io/netty/channel/socket/nio/SendBufferPool.java, the performance issue goes away.
//if (src instanceof CompositeChannelBuffer && DetectionUtil.javaVersion() >= 7) {
// return new GatheringSendBuffer(src.toByteBuffers());
//}
I am using Java 7 open jdk 64 bit so that I can compile Netty. I'm on Ubuntu11.10.
Any thoughts as to why GatheringSendBuffer could cause a slow down in performance?
Thanks
Vibul.