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

Faster tool selection dialog with lots of items nearby #46778

Merged
merged 1 commit into from
Jan 16, 2021

Conversation

mqrause
Copy link
Contributor

@mqrause mqrause commented Jan 15, 2021

Summary

SUMMARY: Bugfixes "Faster tool selection dialog with lots of items nearby"

Purpose of change

Fixes #46772

Describe the solution

Moved a condition so it (usually) doesn't alternate between different calls of Character::crafting_inventory which invalidate the crafting inventory cache.

Describe alternatives you've considered

Wanted to move those calls out of the loop first, but that won't work with the cache and references, I guess.

Testing

See issue.

@BrettDong BrettDong added [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) labels Jan 15, 2021
Copy link
Member

@BrettDong BrettDong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirm significant speed up in the save file in #46772

@sumpfralle
Copy link

@mqrause: thank you a lot for caring for the issue I reported in such an amazingly quick manner!

@ZhilkinSerg ZhilkinSerg merged commit dd3df1b into CleverRaven:master Jan 16, 2021
@mqrause mqrause deleted the tool_selection_slowdown_fix branch January 16, 2021 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cooking: tool selection for heating (e.g. hotplate) is slow
4 participants