5d-diplomacy-with-multiverse-time-travel
5d-diplomacy-with-multiverse-time-travel copied to clipboard
Extreme input lag as the world grows larger
Observed especially during the chaos play test, when it took minutes to enter each order by the end of the game.
After investigating, I found that clicking a region causes every region to re-render due to the possible change in selectability (regions in the past can't be selected at first but can be selected after choosing a unit in the present). Even though there are no visual changes, just using canSelect
anywhere in the render tree in Region.tsx causes enormous input lag on click as every region updates.
I don't have much of an idea of a good solution. Always allowing every region to be selected fixes it, but that's very misleading for the player.