On sexta-feira, 10 de fevereiro de 2012 19.25.04, [email protected]
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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to