Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
6.3.0
-
None
-
-
21
-
35d0f012e (dev), 0f4fb0bf2 (dev)
-
Foundation Sprint 87
Description
There seems to be a severe performance regression in how QDateTime handles dates with very low years (probably all years below epoch). This manifested in our application with severe stuttering.
This code reproduces the problem quickly:
QElapsedTimer timer; timer.start(); for (qint64 i = 0; i < 1E7; i++) QDateTime someday(QDate(1, 1, 1), QTime(0, 0)); qDebug() << "Elapsed:" << timer.elapsed();
This code takes a huge amount of time, I didn't even reach the end. If you replace the year with a value > 1970, then the time to complete is reasonable.
I can reproduce this in MacOS and Windows. I cannot reproduce in Linux.
Qt 5.15 does not seem to be affected.
Attachments
Issue Links
- relates to
-
QTBUG-109201 toString() in macOS' system locale is very slow
-
- Open
-
-
QTBUG-118759 [Regr:6.5->6.6] QDateTime comparison performance regression on macOS
-
- Closed
-
-
QTBUG-56899 Add a static QTimeZone method to refresh system zone information
-
- Open
-