Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
What's the best way to buffer a large map?
kitfox last edited by
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?
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.
ofmrew last edited by
Have you reviewed the spacial database literature? It seems that you are discussing a common GIS issue.
Kent-Dorfman last edited by
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.