Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124132

Speed up retrieval of offline tiles

    XMLWordPrintable

Details

    • All

    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...

      Attachments

        1. patched.webm
          339 kB
        2. unpatched.webm
          250 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paangele Paolo Angelelli
            elgot Henrik Eriksson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes