[bash] Performance improvement
Opened this issue · 0 comments
chr0mag commented
The Bash
version iterates over the entire list of IP blocks for all countries and appends to the country set files as it goes. Repeatedly writing to disk is slow and significant performance benefits can be had by sorting the IP blocks into per-country lists in memory and writing them all out to files in one go.
See #16 and #24 for results of making this improvement to the maxmind
provider in the Python version.
Note that the Bash
version is basically legacy at this point and I have no intention of making this change myself. However, if someone is actively using the Bash
version and wishes to do the work, I will happily accept a PR.