easymodo / qimgv

Image viewer. Fast, easy to use. Optional video support.
GNU General Public License v3.0
2.38k stars 167 forks source link

Update Qt to 6.6 #519

Open AlttiRi opened 12 months ago

AlttiRi commented 12 months ago

Qt 6.6 have fixed the bug that each call of taking file's mtime performs slow OS' call. That results in very slow sorting by time. So, opening of an image in a folder with thousands of images will faster hundreds times.

I wrote about it here: https://github.com/easymodo/qimgv/issues/290#issuecomment-1013809860

More info here: https://forum.qt.io/topic/133954/either-qfileinfo-caching-does-not-work-or-just-its-methods-are-unreasonable-very-slow https://bugreports.qt.io/browse/QTBUG-100349

https://www.qt.io/blog/qt-6.6-released


You only need to use QTimeZone::UTC in a sorting function.

Quite old but in qt6.6 QDateTime::lastModified() gained a new parameter 'QTimeZone' where you can pass QTimeZone::UTC to avoid conversion to the local time. See also https://codereview.qt-project.org/c/qt/qtbase/+/437009

AlttiRi commented 11 months ago

For example, opening an image in a folder with 160k images takes 13 seconds currently.