Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game lags during some activities when the "force redraw" option is enabled #58795

Closed
mqrause opened this issue Jun 28, 2022 · 1 comment
Closed
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.

Comments

@mqrause
Copy link
Contributor

mqrause commented Jun 28, 2022

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

  1. Start a new game in a default world.
  2. Advance time by two seasons.
  3. Teleport to some corn field.
  4. Turn on autoforaging crops.
  5. Move in a straight line through the field both with and without "force redraw" turned on.
  6. Notice a difference (probably only on weaker systems).

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:
force_redraw

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:
do_turn

After turning the option off, movement was pretty much like moving without autoforage, for comparison the profiling result doing the same thing:
no_force

Versions and configuration

Tested and profiled on ba775d7

Additional context

No response

@mqrause mqrause added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jun 28, 2022
@BrettDong BrettDong added Code: Performance Performance boosting code (CPU, memory, etc.) Info / User Interface Game - player communication, menus, etc. labels Jun 30, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Feb 17, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants