ngageoint / hootenanny

Hootenanny conflates multiple maps into a single seamless map.
GNU General Public License v3.0
359 stars 74 forks source link

Implement memory saving scheme in all readers #5630

Closed bmarchant closed 1 year ago

bmarchant commented 1 year ago

OgrReader, OsmXmlReader, and GeoNamesReader all use a memory hash that takes advantage of memory sharing in QStrings for all strings in Tags.

// store all key/value strings in this QHash, this promotes implicit sharing of string data. The
// QHash goes away when the reading is done, but the memory sharing remains.
QHash<QString, QString> _strings;

This code should be extracted into its own interface that is then implemented in all readers to be more memory efficient. This is currently used only in tag keys and values but could be extended to other strings within Hootenanny.