Details: The findPathsInner function in lib/findPaths.js is too
expensive, and has a tendency to throw "too much recursion" errors.
However, it can be optimized. In particular, instead of just
going through all paths, we could go in the paths in the
right direction.
Note that: The current improvements don't do that yet. I was trying
to do that at the findDistance level, but I was being dumb.
Too much recursion error: Use a simpler table
Make sure mongo request goes through:
- Do it before the computation +
- + put the computation inside a timeout.