Game 263552 is stuck. The pending action, a pass in the buy trains step, takes long enough that the inspector returns a 502, so the game cannot be advanced at all.
https://18xx.games/game/263552
Loading the game is not the bottleneck. Profiling attributes almost the entire request to Graph#compute and Part::Path#walk, reached from check_for_destination_connection. That check sits behind CheckDestinationConnection#actions, so it runs on every action rather than only when track is laid, and twice per request, once while looking for the step that handles the action and once in skip_steps. The graph it asks is a no_blocking one, so token blocking does not prune the walk and a single call covers the whole board.
Two things drive this independently. How expensive a single call is depends on the corporation: without token blocking, a corporation's own tokens no longer bound the walk, so corporations with few tokens are the most expensive ones, which is the opposite of what you would expect. How long it persists depends on whether the corporation ever connects, since destination_connected? is the only cheap exit. In 263552 GSSR can never reach its destination hex, so the walk runs on every action until the game ends. It also happens when the destination hex does have track: in 245301 the check for CRB keeps running and keeps getting slower as the map fills in.
This is not the loading path from #12579, and it is not validate_auto_actions: the action costs the same with and without it.
https://gist.github.com/chrstas/f9254c9846be8b1b6cc32f9ae5d0e85c
Game 263552 is stuck. The pending action, a pass in the buy trains step, takes long enough that the inspector returns a 502, so the game cannot be advanced at all.
https://18xx.games/game/263552
Loading the game is not the bottleneck. Profiling attributes almost the entire request to
Graph#computeandPart::Path#walk, reached fromcheck_for_destination_connection. That check sits behindCheckDestinationConnection#actions, so it runs on every action rather than only when track is laid, and twice per request, once while looking for the step that handles the action and once inskip_steps. The graph it asks is ano_blockingone, so token blocking does not prune the walk and a single call covers the whole board.Two things drive this independently. How expensive a single call is depends on the corporation: without token blocking, a corporation's own tokens no longer bound the walk, so corporations with few tokens are the most expensive ones, which is the opposite of what you would expect. How long it persists depends on whether the corporation ever connects, since
destination_connected?is the only cheap exit. In 263552 GSSR can never reach its destination hex, so the walk runs on every action until the game ends. It also happens when the destination hex does have track: in 245301 the check for CRB keeps running and keeps getting slower as the map fills in.This is not the loading path from #12579, and it is not
validate_auto_actions: the action costs the same with and without it.https://gist.github.com/chrstas/f9254c9846be8b1b6cc32f9ae5d0e85c