- don't use setFilterFid() within loops to fetch features one
at time (as it's extremely slow), instead use setFilterFids()
outside the loop
- don't fetch unused attributes/geometry when it can be
avoided
Since the layer has more complete knowledge of the crs (ie, when
provider could not determine crs and user has selected it from
the list), and also better knowledge of layer fields (virtual
fields, joined fields) we should use these rather than the
provider methods.
- Avoid use of seperate feature requests for every point
- Use GEOS prepared geometries when testing for point containment
Quick stats:
~1500 point layer
BEFORE: 17 seconds
AFTER: 3 seconds
~900k point layer
BEFORE: 30 mins = canceled at 20%
AFTER: 2.5 mins = 100% complete