Skip to content

Conversation

supersaiyansubtlety
Copy link
Member

Fixes #271

Makes it so that Gui::reloadStats:

  • attempts to cancel any incomplete asynchronous work it started in previous calls
  • waits for any un-cancelable prior work to complete before starting the current call's work

I also made ProjectStatsResult.stats a ConcurrentHashMap because I got this ConcurrentModificationException once:
enigma_crash-concurrent-reloadStats.log.

I think the exception was possible but rare before this PR, but it was inconsistent so I can't be certain.

Supersedes #286

@supersaiyansubtlety supersaiyansubtlety self-assigned this Sep 17, 2025
@supersaiyansubtlety supersaiyansubtlety added bug Something isn't working enhancement New feature or request user interface affects the enigma ui labels Sep 17, 2025
@ix0rai ix0rai self-requested a review October 3, 2025 20:50
@supersaiyansubtlety supersaiyansubtlety linked an issue Oct 5, 2025 that may be closed by this pull request
Copy link
Member

@ix0rai ix0rai left a comment

Choose a reason for hiding this comment

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

this looks great! you can definitely feel the improvement, especially when first loading the project. i'm confident this solves the issue in the backend, but it's still possible for the UI to go from an incorrect icon to another incorrect icon before landing on the correct one, thanks to the extremely slow reloads on the jtree rendering. honestly, i'm kinda wondering how much effort it would be to try to make a faster jtree with better management for what's actually loaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request user interface affects the enigma ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapping too quickly creates inaccurate mapping stats

2 participants