Game lags during some activities when the "force redraw" option is enabled #58795
Labels
Code: Performance
Performance boosting code (CPU, memory, etc.)
Info / User Interface
Game - player communication, menus, etc.
(S1 - Need confirmation)
Report waiting on confirmation of reproducibility
stale
Closed for lack of activity, but still valid.
Describe the bug
I experienced massive lag when autoforaging my crop field. Taking a step and foraging two crop tiles took roughly one second.
Steps to reproduce
Instead of autoforaging, differences are also noticeable when sorting large amounts of loot with zones, or when picking up, dropping or hauling large quantities of items. Other activities might also be affected. It might be that movement of characters and items simply makes the lag more obvious.
Expected behavior
The game runs smooth and only does as much redrawing as necessary.
Screenshots
This is the profiling result:
Most notably this is caused by the "force redraw" option being enabled, which is the default setting. The code in question is in
do_turn
:After turning the option off, movement was pretty much like moving without autoforage, for comparison the profiling result doing the same thing:
Versions and configuration
Tested and profiled on ba775d7
Additional context
No response
The text was updated successfully, but these errors were encountered: