Closed DiamantTh closed 12 months ago
Why? Those files contain the same data but the CSV data is in a less efficient format for the server to look data up in.
Why? Those files contain the same data but the CSV data is in a less efficient format for the server to look data up in.
I think you should have as a user if already the choice what he prefers
Choice just for the sake of having choice isn't a good thing. Adding support for the CSV files would result in significantly slower lookup as they aren't optimised (the MMDB format is explicitly optimised for fast lookup), would increase the complexity of the module, and would increase the burden of maintenance whilst providing no actual benefit to the user over using the MMDB file.
Is there any actual reason to support them other than just to give users choice?
Is it really so slow that an implementation is not worthwhile?
Another IRCd supports in addition exemplarily also still .dat files for the GEO-IP module beside the CSVs and the mmdb file...
Yes, it's extremely slow especially if you want IPv6 support where the search space is substantially bigger than for IPv4. CSV is not an optimised format for lookup and the CSV data is split across several files so in order to implement it efficiently we would probably need to implement a bunch of preprocessing so we could memory map it efficiently which would effectively be writing a ton of code (which needs to be maintained) that just reinvents the MMDB format.
It's just not worth it for something which, again, provides literally no benefit other than choice for the sake of choice.
Hello,
I would be interested in an addition to the existing module geo_maxmind.
Instead of loading now the not readable
GeoLite2-Country.mmdb
one could supplement this by the readableGeoLite2-Country-Locations-(de,en).csv/GeoLite2-Country-Blocks-IPv4.csv
Greetings