REPRODUCIBILITY: 100%
OS VERSION: 4.5.0.24
HARDWARE: Xperia X
UI LANGUAGE: German
REGRESSION: No
DESCRIPTION:
I have a few thousand pictures on my phone. Sharing one through an app that uses e.g. the ImagePickerPage
from the Sailfish.Pickers
QML module is impossible because it makes the app freeze for multiple minutes, and often crash.
PRECONDITIONS:
Have some files on your phone, e.g. 10’000 pictures or 1’000 music files. Way fewer files already make the pickers choke.
STEPS TO REPRODUCE:
- Try to share a picture via Hydrogen or Whisperfish
- Scream in agony
- Seriously reconsider life choices
EXPECTED RESULT:
It should be fast.
Open a folder with 15’000 images in File Browser. Sort by modification date or by size. Be amazed how it takes only the blink of an eye to update the view.
ACTUAL RESULT:
It takes minutes and often makes apps crash.
MODIFICATIONS:
ADDITIONAL INFORMATION:
I’m pretty sure the file pickers rely on File Browser’s legacy code base that was still in the public domain. Back then, File Browser was also suffering from abysmal performance with large folders. When I took over, that was one of the main pain points for me so I fixed it.
The implementation is here: harbour-file-browser/src/filemodelworker.cpp at main · ichthyosaurus/harbour-file-browser · GitHub (GPL-3.0-or-later). It uses a worker thread for updating the file list, and custom sorting using std::sort
from <algorithm>
because QDir
's broken sorting is the performance killer here.
Maybe the performance issues also come from the tracker
because the gallery app also takes minutes to load on my phone…
Sadly, Sailfish.Pickers
is closed source, so a) I won’t be fixing it, and b) Jolla can’t use my implementation from File Browser. Dear Jolla people, the easy way out would be to make the module open source, then I could simply fix it for everyone.