pooja001 / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

Large message takes too long to be sent #129

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Send a large message (something like 50~70kb)
2.
3.

What is the expected output? What do you see instead?
The message should be sent in a timely manner, but it is taking up to 30 
seconds.

What version of the product are you using? On what operating system?
2.1.0.710, Windows 7.

Please provide any additional information below.
After some tests I've noticed that increasing the buffer size in 
bedrock.io.ZlibStream from 1024 (bytes) to something larger than the size of 
the message solved this issue. With a 200kb buffer, it took less than 0.05 
seconds to send a 70kb message.

It would be nice to have some way to change the buffer size without having to 
hard code a new value. Attached are the changes I made to solve my problem (I 
also changed the buffer in AsyncSocket). I basically changed the buffer sizes 
from consts to public static fields, wich I can change in my code.

I didn't include any test because it is a very simple change... But I can 
provide a few if necessary.

Original issue reported on code.google.com by daniel.p...@gmail.com on 28 Nov 2012 at 7:16

Attachments: