[Qt-interest] Can muti-thread improve the speed here?
Kermit Mei
kermit.mei at gmail.com
Sun Apr 5 23:59:32 CEST 2009
Hello, I want to transport a file in my local-network, and I use
TcpSocket to do it. But, When I send the file to my self, the local
host, I found that the speed is just less than 2M/s, whereas my
hard-dist have a average speed 11M/s.
I think what cause it slow is that the signal/slots, because TcpSocket I
use the code like this to control the translate:
connect(&tcpClient, SIGNAL(bytesWritten(qint64)),
this, SLOT(updateTranslate(qint64)));
And another reason, the QByteArray and QDataStream may be also slow than
the system interface and STL's stream.
So, I want to know how can I improve it. I hope it at least can get the
speed of 6M/s when I transport a file to myself(LocalHost). How about
Muti-thread? I want use mutil-thread to send the file at different
position of it. Or any other better ways?
Thanks.
More information about the Qt-interest-old
mailing list