Serving getYTYSolver bottlenecks in some contexts
srowen opened this issue · comments
Sean Owen commented
Two related issues:
getYTYSolver
can be called by two threads at once. It's OK for correctness because one result will just be discarded anyway but it's wasteful ... and if a load of requests hit at once this could result in lots of unneeded load.
Every item update causes a recomputation. This is for the moment going to stay as-is for correctness. However it also causes any subsequent requests to block until a new solver is ready. Instead they could continue with the last one while a new one is computed asynchronously.