osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Make some data optional

Open danpat opened this issue 7 years ago • 3 comments

It'd be nice if you didn't need to load all the OSRM data if you didn't need it.

For example, if you never need turn-by-turn guidance, then it should be possible to skip the turn-by-turn data generation (save some time), and not bother loading it (save some memory). If you never need geometry (&geometries=false), then it shouldn't be required to load it.

Steps to getting this done are:

  1. Figure out which data structures various API parameters trigger traversal of (this could be done by looking at calls to the Datafacade interface)
  2. Make data loading optional for various only-used-sometimes data (including how to actually tell OSRM which data not to load).
  3. Modify datafacade interface to return a "data not loaded" error if a not-loaded is accessed
  4. Modify API interface to return a descriptive error if data isn't loaded

For a first version of this, we can limit it to not loading data into osrm-routed/node-osrm. As a second phase, we could possibly skip the creation of some data altogether (e.g. turn-by-turn data if it's not going to be used).

danpat avatar Oct 02 '18 00:10 danpat