Skip to content

fancyholograms-v2: implement text caching and configurable update intervals for holograms to improve performance#215

Open
ssquadteam wants to merge 1 commit intoFancyInnovations:mainfrom
ssquadteam:main
Open

fancyholograms-v2: implement text caching and configurable update intervals for holograms to improve performance#215
ssquadteam wants to merge 1 commit intoFancyInnovations:mainfrom
ssquadteam:main

Conversation

@ssquadteam
Copy link
Copy Markdown
Contributor

📋 Description

Port of #156 into FancyHolograms-v2

✅ Checklist

  • [ ✅ ] My code follows the project's coding style and guidelines
  • [ ✅ ] I have tested my changes locally and they work as expected
  • [ Not Applicable ] I have added necessary documentation (if applicable)
  • [ Not Applicable ] I have linked related issues using Fixes #issue_number or Closes #issue_number
  • [ ✅ ] I have rebased/merged with the latest main branch

🔍 Changes

Please provide a brief summary of the changes made in this PR.

  • Updated fancyholograms-v2 to mirror the accepted v3 performance patch for dynamic text holograms.
  • Refactored text rendering to cache per-player translated hologram text and invalidate it when hologram data changes.
  • Fixed excessive placeholder/text refresh work by making the refresh loop configurable and reducing unnecessary repeated translations.

🧪 How to Test

Please describe how to manually test the changes made in this PR.

  1. Create a text hologram that uses a dynamic placeholder and set update_text_interval to a positive value, then verify the hologram still updates normally for players in-game.
  2. Stand near the hologram with one or more players online and watch server performance with Spark
  3. Edit the hologram text or another display property and confirm the visible text updates correctly right after the change, which verifies cache invalidation works properly.

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