[Interest] Multiple QNetworkAccessManagers for a single app

Jason H jhihn at gmx.com
Thu Jan 11 22:57:15 CET 2018


> But is it a performance issue, a potential threading problem, what?
not to my knowledge, not to my knowledge. 

It's just that:
1) I/O is async having more won't make it faster
2) Whatever resources are being managed will be managed separately, unaware of the rest. 

I regularly (accidentally) used two - one built into QML and one for C++ land. See also http://doc.qt.io/qt-5/qqmlnetworkaccessmanagerfactory.html


> Sent: Thursday, January 11, 2018 at 1:41 PM
> From: "Tom Isaacson" <Tom.Isaacson at navico.com>
> To: "Thiago Macieira" <thiago.macieira at intel.com>, "interest at qt-project.org" <interest at qt-project.org>
> Subject: Re: [Interest] Multiple QNetworkAccessManagers for a single app
>
> But is it a performance issue, a potential threading problem, what?
> 
> We have a large codebase and this practice hasn't been followed, I'm wondering what the potential impact is and whether it's worth fixing.
> 
> Thanks.
> 
> Tom Isaacson
> 
> On Wednesday, 10 January 2018 20:26:16 PST Tom Isaacson wrote:
> > There’s a comment in the QNetworkAccessManager help:
> > “One QNetworkAccessManager should be enough for the whole Qt application.”
> > 
> > There are several discussions online about whether this is a 
> > requirement or just a recommendation. Consensus seems to be that it’s 
> > a recommendation but what’s the best practice?
> 
> It's a suggestion. And there's a good reason for it being a suggested: it's the best practice.
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



More information about the Interest mailing list