The current Python implementation does a Tree/String comparison to evaluate requirements and check location access.
Because we have to do that for each location we hit, that implies a O(N * M) complexity, where N is the number of locations, and M is the average requirement amount.
If we could precompute, either before providing the world graph, or during the world graph parsing, a different way to represent the requirements, we could potentially have a constant evaluation time, dropping us to O(N) to evaluate all the locations.
The current Python implementation does a Tree/String comparison to evaluate requirements and check location access.
Because we have to do that for each location we hit, that implies a
O(N * M)complexity, where N is the number of locations, and M is the average requirement amount.If we could precompute, either before providing the world graph, or during the world graph parsing, a different way to represent the requirements, we could potentially have a constant evaluation time, dropping us to
O(N)to evaluate all the locations.