Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What's the best way to buffer a large map?
Forum Updated to NodeBB v4.3 + New Features

What's the best way to buffer a large map?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 286 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by
    #1

    I have program that contains a QMap that uses a custom data structure as a key and maps to a float. (The key has a somewhat complex design). The program has grown to the point that I need to index about 7 million entries in my map, and this is causing me to run out of memory.

    I'm thinking that I might need to store all this info in some sort of local database instead, but am unsure of the best way to go about this. I could use SQL, but I am worried that it might be slow. Does Qt provide a fast way to create a file-backed map?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @kitfox said in What's the best way to buffer a large map?:

      Does Qt provide a fast way to create a file-backed map?

      No, you have to do it by your own. Maybe you can use QCache and load it from the db if it's no longer in the cache.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • O Offline
        O Offline
        ofmrew
        wrote on last edited by
        #3

        Have you reviewed the spacial database literature? It seems that you are discussing a common GIS issue.

        1 Reply Last reply
        1
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by
          #4

          I think if you've grown to the point of 7million keys then you're way into the realm of using a real database and using something like SQL queries to pull information.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved