Comment 3 for bug 1585285

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

On my beefy laptop, when opening a new tab, the UrlGridView for the list of top sites in the new tab view takes ~250ms to instantiate, of which almost half the time (115ms) is for instantiating the Loader that contains one Favicon.

After moving away the favicons cache folder, instantiating the favicons is almost instantaneous (they are being re-downloaded on a different thread), and instantiating the UrlGridView is down to 170ms, which is still expensive, but better.

I instrumented the favicon fetcher code, and the culprit seems to be the first icon being downloaded (usually because the favicon doesn’t actually exist, but we’re not tracking that, so we try to download it anyway because it hasn’t been cached on disk). Specifically, on my laptop instantiating the first QNetworkAccessManager takes ~100ms. One QNAM is being instantiated for each favicon that we fetch from the network, but the subsequent instantiations are free, only the first one is expensive. This would need some further investigation in Qt itself.

One optimization we could try to apply is to cache an empty file on disk for non-existent favicons, in order to avoid trying to re-download them over and over again.