summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/widgetdelegate.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-11-14 12:56:19 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2023-11-27 21:24:01 +0100
commit731b759c00ce17072e3f93fdd7044490e51171ca (patch)
treee92a536f8f4efef40b17f20e6763fa9ae1072416 /src/widgets/doc/snippets/widgetdelegate.cpp
parentaca108a174dcb97b55d1604e24670dab63f0e0f5 (diff)
ASN1: speed up parsing of certificate timestamps
By parsing QDate and QTime separately it will internally parse the values as-if-by UTC. This means we avoid the overhead of figuring out what the local timezone is repeatedly for each certificate. On Windows, with Schannel, this brings QAsn1Element::toDateTime from consuming more than 97% of the test time to below 10%. The test being tst_QSslSocket::systemCaCertificates. It also goes from taking 1 minute in debug, to 1 second. As a drive-by: add a (currently) failing test for Feb 29 2000, which fails because we decode the date as 1900 before adjusting it to 2000. But there is no 1900-02-29, so it returns an invalid date. As spotted by Eddy. Pick-to: 6.6 6.5 Change-Id: Iefa73a01d710129faf6412c4fa8bc2b5d7c98bbb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/widgetdelegate.cpp')
0 files changed, 0 insertions, 0 deletions