[Development] Default enabling inbound flow control on sockets

Thiago Macieira thiago.macieira at intel.com
Mon Feb 13 20:26:31 CET 2012


On sexta-feira, 10 de fevereiro de 2012 19.25.04, shane.kearns at accenture.com 
wrote:
> We could change the default read buffer size from 0 (unbounded) to a
> sensible default value e.g. 64k (to be benchmarked) Applications wanting
> the old behaviour could explicitly call setReadBufferSize(0) Applications
> that already set a read buffer size will be unchanged
[snip]

> This is a behavioural change that would certainly cause regressions.
> e.g. any application that waits for the QNetworkReply::finished() signal and
> then calls readAll() would break if the size of the object being downloaded
> is larger than the buffer size.

As you said yourself, there's a huge potential for regressions here, 
especially with a limit as low as 64k. So I am unsure whether we should do 
this at all.

We could apply a high buffer size, like 1 MB. That's probably enough to contain 
most data files being downloaded and yet avoid exploding by OOM. On a modern 
embedded system, an application would need to be downloading 50 items in 
parallel (which means from at least 9 different servers) before it started to 
get into trouble.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120213/bee00665/attachment.sig>


More information about the Development mailing list