[Qt-interest] wget vs. QHttp download

Scott Aron Bloom Scott.Bloom at onshorecs.com
Fri Nov 5 08:17:18 CET 2010


One thing I have hit before with BOTH QHttp and QNAM is how you are
storing the data.  Try the download but when a readyRead is sent, do a
readAll to clear out the cache.

 

Scott

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of amulya rattan
Sent: Thursday, November 04, 2010 4:24 PM
To: Thiago Macieira
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] wget vs. QHttp download

 

Hi Thiago,

 

Thanks for the reply. The code that is using QHttp was written somewhere
around March 2009 when this class wasn't obsolete. But I agree, I should
now use QNetworkAccessManager. However, has there been any changes to
QNetworkAccessManager that makes it download faster? I suspect not.
Also, what advantages would I get if I use the new class? Is it just a
better designed interface or more than that? I ask all this since I have
a lot of code using QHttp and I need to know how much better off I'd be
using the new class.

 

About the measurements, all I did was start timer before download and
end timer when the download was done. This has become a strange problem
since download theoretically/practically should only depend upon the
network speed, but the vast difference in response from wget and QHttp
is just appalling. 

 

I'd again like to mention that its a simple download from one of our
servers, that I am trying to do. Nothing fancy.

 

~Amulya

 

On Fri, Nov 5, 2010 at 4:23 AM, Thiago Macieira <thiago at kde.org> wrote:

On Thursday, 4 de November de 2010 11:08:58 amulya rattan wrote:
> Guys,
>
> Recently I have been trying to calculate the download speed for our
> network, so basically what I did was just use QHttp to download a file
on
> the server and calculate the time it took to figure out the network
speed.
> However, the speed estimates I got were rather off the track, which
led me
> to try out wget. With wget, the speed estimates are pretty much on the
> spot. Does anyone know why such a difference exists? I understand that
the
> network speed can go up and down and it could be what is happening in
this
> case BUT I have tried this thing literally hundreds of times now and
> everytime its wget that gives a proper estimate. QHttp download for
some
> reason is always "slower".

Hi Amulya

First of all, please stop using QHttp. Use QNetworkAccessManager like
the
documentation asks you to.

Second, we need a better explanation to understand what you mean. I can
reach
11-12 MB/s downloads on our office network using QNAM (100 MBit/s
full-duplex).
That's the limit of the network.

Also note that the problem might be the measurement you made.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
 Senior Product Manager - Nokia, Qt Development Frameworks
     PGP/GPG: 0x6EF45358; fingerprint:
     E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101105/1e81ec1e/attachment.html 


More information about the Qt-interest-old mailing list