Skip to content

Conversation

@Paul1365972
Copy link
Contributor

This is a follow-up to PR #203 and is a bit more involved.
The changes have been tested and are working as expected, however there may be some weirdness around some edge cases.
One example is when one tick takes considerably longer than the rest or the plot's thread is parked/scheduled irregularly by the OS under higher load.
I couldn't really figure out these issues, but as they were already present before, although in different capacity, I think this PR is fine as is.

Further ideas:

  1. We could probably defer the redpiler flush to only run just before we send the world.
    I can't think of any issues this would cause as we already reset the redpiler causing a flash right before any outside modifications to the world.
  2. Add a timeout parameter to the tickn function for the JITBackend and let it manage itself.
    This would probably simplify the logic a bit, the backend would need to count the amount of ticks run or possibly rather "updates" and estimate a more realistic running time via that. This way we do not need to run the tickn function in batches, which max out at 50000 so we never accidenly overload and block the thread for too long.

I will rebase this PR as soon as #203 is merged.

@Paul1365972
Copy link
Contributor Author

Hmm, I think I will just rebase instead, not sure how the commit history will looks if you merge a merge commit

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

Successfully merging this pull request may close these issues.

1 participant