nkzw-tech / athena-crisis

Athena Crisis is an Advance Wars inspired modern-retro turn-based tactical strategy game. Athena Crisis is open core technology.
https://athenacrisis.com/open-source
Other
1.37k stars 105 forks source link

[Performance] EvaluationPanel run map evaluations in async worker #31

Closed anan474 closed 1 month ago

anan474 commented 1 month ago

This PR close #16

Run map evaluation with worker and async making this operation non-blocking.

Unfortunately web worker is not yet supported in HMR (https://github.com/vitejs/vite/issues/5396). So this non-blocking map evaluation only available in production, and will use previous blocking function in development mode.

cpojer commented 1 month ago

Thanks for submitting a PR! Please check out the comments and fix the lint issues to make sure CI passes.

anan474 commented 1 month ago

Thanks for submitting a PR! Please check out the comments and fix the lint issues to make sure CI passes.

Thanks for the opportunity! I have updated the code and resolve the issue.

cpojer commented 1 month ago

@anan474 Oh no, I'm so sorry. I made a bunch of changes and tried to add them to the commit, but something went wrong :( Would you mind pushing your branch again either to this PR or by creating a new one?

The commits can be found on this branch: https://github.com/nkzw-tech/athena-crisis/tree/anan474/main

anan474 commented 1 month ago

Hi @cpojer, no problem! I don't know how to push to this PR again, so I will create a new one!

Anyway, your fixes and polish is awesome, glad you found the solution for the $RefreshReg$ things, it bothering me for hours to no ends!