[Development] Performance of QUdpSocket writeDatagram between Qt4 and Qt5 in different GNU/Linux platforms

Peter Hartmann phartmann at blackberry.com
Wed Feb 26 10:29:46 CET 2014


Hello,

it might be the socket is bind()ing to a local address when it does not 
need to; would you be able to file a bug report with a program to 
reproduce the problem?

Thanks,

Peter


On 02/26/2014 09:28 AM, Mauro Brenna wrote:
> Hello Jan,
>
> Thanks for the suggestion.
>
> The answer is YES they are behaving quite differently:
>
> Here the output while in the for loop:
>
> QT4.8.5
>
>
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
> sendto(7, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET,
> sin_port=htons(45454), sin_addr=inet_addr("255.255.255.255")}, 16) = 19
>
>
> QT 5.1.1
>
>
> sendto(6, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET6,
> sin6_port=htons(45454), inet_pton(AF_INET6, "::ffff:255.255.255.255",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 19
> socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
> ioctl(7, SIOCGIFINDEX, {ifr_name="", ???}) = -1 ENODEV (No such device)
> close(7)                                = 0
> sendto(6, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET6,
> sin6_port=htons(45454), inet_pton(AF_INET6, "::ffff:255.255.255.255",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 19
> socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
> ioctl(7, SIOCGIFINDEX, {ifr_name="", ???}) = -1 ENODEV (No such device)
> close(7)                                = 0
> sendto(6, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET6,
> sin6_port=htons(45454), inet_pton(AF_INET6, "::ffff:255.255.255.255",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 19
> socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
> ioctl(7, SIOCGIFINDEX, {ifr_name="", ???}) = -1 ENODEV (No such device)
> close(7)                                = 0
> sendto(6, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET6,
> sin6_port=htons(45454), inet_pton(AF_INET6, "::ffff:255.255.255.255",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 19
> socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
> ioctl(7, SIOCGIFINDEX, {ifr_name="", ???}) = -1 ENODEV (No such device)
> close(7)                                = 0
> sendto(6, "Broadcast message 0", 19, MSG_NOSIGNAL, {sa_family=AF_INET6,
> sin6_port=htons(45454), inet_pton(AF_INET6, "::ffff:255.255.255.255",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 19
> socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
> ioctl(7, SIOCGIFINDEX, {ifr_name="", ???}) = -1 ENODEV (No such device)
> close(7)                                = 0
>
> What can I do to have the same behaviour as QT 4.8.5. It sounds like a
> QT5 .1.1 is trying to set a connection or something like that.
>
> Kind regards,
>
> Mauro
>
>
>
>
>
>
>
> On 25 February 2014 18:46, Jan Kundrát <jkt at flaska.net
> <mailto:jkt at flaska.net>> wrote:
>
>     On Tuesday, 25 February 2014 16:56:53 CEST, Mauro Brenna wrote:
>      >  I looked a bit in the qt code and saw a bind() inside the QT5
>      > writeDatagram method, which I do not immediately understand but I
>     do not
>      > know if might cause the issue.
>
>     Is there any difference in `strace` when you instrument the Qt4 and Qt5
>     versions of the test?
>
>     Cheers,
>     Jan
>
>     --
>     Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
>     _______________________________________________
>     Development mailing list
>     Development at qt-project.org <mailto:Development at qt-project.org>
>     http://lists.qt-project.org/mailman/listinfo/development
>
>
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>




More information about the Development mailing list