MKuranowski / pyroutelib3

Simple routing over OpenStreetMap data
https://pyroutelib3.readthedocs.io/
GNU General Public License v3.0
79 stars 24 forks source link

Possibility to change SEARCH_LIMIT #27

Closed PositivPy closed 2 months ago

PositivPy commented 2 years ago

I encountered the problem when using your library with Django: the request and server would hang forever because the SEARCH_LIMIT is set to 1M. Modifying the source code with a 100K limit did the trick.

It would be great if you could add this as an argument to the router/DataStore.

MKuranowski commented 2 years ago
import pyroutelib3.util
pyroutelib3.util.SEARCH_LIMIT = 100_000

Should do the trick, tough modifying what are essentially constants isn't perfect practice.