maxmind/GeoIP2-dotnet

DatabaseReader overload that takes a stream and mapping mode.

niemyjski opened this issue · 2 comments

I have been storing my geoip database in azure blob storage and passing a stream of that database file to the database reader. However, I just realized that all my calls to the database are slow... And the default mode is MemoryMapped instead of in memory. Can you please add an overload that allows me to load the entire database in memory.

Memory-mapping is only available when using a file. If you are using a stream, you will already be using the memory mode.

Thanks, I ended up digging into the code. I'm seeing random perf issues with lookups taking 6-10 seconds. The default constructor overload made me think it was memory mapped by default.