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

cache scenario preview widget #2143

Merged
merged 2 commits into from
Sep 10, 2024
Merged

cache scenario preview widget #2143

merged 2 commits into from
Sep 10, 2024

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Sep 10, 2024

Fixes the lag issue noted in #1515.

Demo

  1. First, launch a toplevel scenario:
    scripts/play.sh -i data/scenarios/blank.yaml
    
  2. Then use Ctrl+q to quit to the scenario selection menu.
  3. Notice when using up-arrow to select the "Classic" and "Creative" scenarios, there is a delay as the preview is computed for the first time.
  4. Finally, when subsequently selecting back and forth between the two again, notice that the lag is gone, as the cache is being used.

@kostmo kostmo added T-UI Involves the user interface. Z-Performance This issue concerns memory or time efficiency of the Swarm game. labels Sep 10, 2024
@kostmo kostmo marked this pull request as ready for review September 10, 2024 05:45
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

That was... a lot easier than I thought it would be! 👍

Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

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

That is a noticeable difference. 👍

@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Sep 10, 2024
@mergify mergify bot merged commit 7b99e72 into main Sep 10, 2024
12 checks passed
@mergify mergify bot deleted the feature/cache-scenario-preview branch September 10, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request. T-UI Involves the user interface. Z-Performance This issue concerns memory or time efficiency of the Swarm game.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants