|
Question about the Java code
I am reading the ice code related to the network operations and have 2the following questions.
1. BasicStream.java -> I see that you commented out the allocateDirect and use heap buffer instead. Any reason? Our tests shows much better performance for the DirectBuffer as long as it is re-used.
2. ThreadPool#read(EventHandler handler) -> After reading the payload size (int size = stream.readInt()). it looks like you are reading from the socket with expectation it will have that content/playload readily available (making the bytebuffer its size and reading with zero timeout). Do I read it correctly and if so how can you guaranty that (the palyload will be available to a non-blocking read)?
Thanks,
Arie.
|