Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.0
Description
The current way of looking up offline map tiles is slow (and can lead to serious lagging) for directories with lots of files. I propose a scheme based on QDir::exists instead of QDir::entryList.
Like this, perhaps:
https://github.com/Elgot/qtlocation/commit/0fe714b6bb43d32c921184a748b20320299123ce
Instead of searching for files that match the format I check the base file name with all extensions that are represented in the directory until a file is found (or not).
On my machine, and a tile directory with 400 000 files, the entryList method needs 23 seconds to get 100 tiles while the exists method is done in less than 1 ms...