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

Avoid nearby colony lookup on each frame #9972

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Conversation

someaddons
Copy link
Contributor

Closes #
Closes #
Closes #

Changes proposed in this pull request:

  • Avoid nearby colony lookup on each frame

[x ] Yes I tested this before submitting it.
[ ] I also did a multiplayer test.

Review please

@uecasm
Copy link
Contributor

uecasm commented Jun 2, 2024

Wouldn't it make more sense to cache this based on the player crossing chunk boundaries? There's already some other stuff in here that does that, and the nearby colony is unlikely to change without the player moving around.

@someaddons
Copy link
Contributor Author

The other stuff you're thinking on is serverside, clientside just has one player and data is more volatile due to sync timing. So performance wise there is little benefit to more caching and it'd have a higher risk of problems

@Nightenom
Copy link
Member

Nightenom commented Jun 2, 2024

Just wonderin, can't we do once per second vs random out of 20?

@uecasm
Copy link
Contributor

uecasm commented Jun 2, 2024

No, it's client-side too. Look inside the ColonyBorderRenderer and the ColonyBlueprintRenderer for example.

@Raycoms Raycoms merged commit 758292b into version/main Jun 9, 2024
2 checks passed
@Raycoms Raycoms deleted the rendercolonyview branch June 9, 2024 09:05
Raycoms added a commit that referenced this pull request Jul 27, 2024
Avoid nearby colony lookup on each frame
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.

4 participants