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

UI Fails to Refresh During "Thinking..." Phase on Large Boards and Slow Machines #2

Open
sght500 opened this issue Jan 2, 2025 · 0 comments

Comments

@sght500
Copy link
Owner

sght500 commented Jan 2, 2025

Problem:

When using the program on slow machines (e.g., HP 1000 with an Intel Core i3 processor) and large game boards (e.g., 7 rows by 10 columns), the UI does not refresh properly during the "Thinking..." phase. As a result, the arrow buttons, which should appear after the calculations, are not displayed automatically.

Steps to Reproduce:

  1. Run the program on a slow machine (e.g., HP 1000 with an Intel Core i3 processor).
  2. Set up a game board with dimensions of 7 rows by 10 columns.
  3. Wait for the program to finish calculating during the "Thinking..." phase.
  4. Observe that the "Averages" button does not appear automatically.

Expected Behavior:

The UI should refresh automatically, and the arrow buttons should appear once the calculations are complete.

Observed Behavior:

The program seems to get stuck in the "Thinking..." phase, and the user has to manually click the "Refresh" button in the web browser to make the arrow buttons appear.

Possible Cause:

This issue may be due to a lack of UI updates during computationally intensive tasks. The application might not be yielding control back to the event loop to allow for UI refreshes.

Suggested Solution:

Implement periodic UI updates during the "Thinking..." phase by using asynchronous tasks or explicit UI refresh calls (e.g., await ui.update()) to prevent the application from becoming unresponsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant