Comment 4 for bug 1585285

Revision history for this message
Olivier Tilloy (osomon) wrote :

I experimented with a very simple test application to measure how expensive it is to create instances of QNetworkAccessManager, and the results are consistent (and surprisingly similar on my beefy laptop and on an MX4):

int main(int argc, char** argv) {
  QCoreApplication app(argc, argv);
  for (int i = 0; i < 10; ++i) {
    QElapsedTimer timer;
    timer.start();
    QNetworkAccessManager nam;
    qDebug() << i << "elapsed:" << timer.elapsed();
  }
  return 0;
}

The first instance takes anywhere between 75 and 125ms to create, subsequent instances are free.