I tried to add a couple more tweaks based on your PR, done in an extra commit:
The country query limits the fields, so it doesn't download additional fields like iso codes, or population estimates.
The countries are ordered by area in decreasing order instead of name. So largest areas/countries will be checked first, since those have a higher chance of containing the points.
I've added prepared geometries, which should be faster at contains queries but don't support distance.
I don't have a large enough sample dataset to try this, could you sanity check that this actually improves things?
Coverage remained the same at 100.0% when pulling 622e06c041f20c5a34d8fa415ebc52a0e10d4fdf on hannosch:282-hannosch into 5fa2be8cf7a513d155bc30402df8e34a61bfecb8 on mozilla-services:master.
@jaredkerim
I tried to add a couple more tweaks based on your PR, done in an extra commit:
I don't have a large enough sample dataset to try this, could you sanity check that this actually improves things?