Billboard GUI over NPCs is causing a large amount of FPS lag.
In this test place, when billboard GUIs are enabled I am getting ~90-150 FPS. When they are turned off, I am at a stable 240 FPS.
The Billboard GUI used in this test is extremely barebones.
This clip from a tester of my game is what made me aware of this problem. Billboard GUIs when enabled, are causing the game to be extremely laggy. When Billboard GUIS are toggled off, the game is smooth.
Repro File billboardlag.rbxl (75.0 KB)
Press R to spawn dummies
Press P to toggle UI
I would expect that toggling on and off the UI of NPCs would not affect performance in such a huge way. I would expect pathfinding and NPC AI to be the primary source of lag, not billboard GUIs. I would not expect Billboard GUIs to be so heavily taxing on performance.
I dont think this is a bug, but heres some ways to counter this issue
only show health/info bar when the player is hovering their mouse over it
or when the enemy has recently taken damage
add damage onto an already existing damage indicator
or have a limit to how many can exist at once (globaly or local to the enemy) and remove older ones early
Thanks for your report!
We are generally working on performance, where this falls under.
Please note that neither text nor billboard rendering is low impact.
Hey @JustADankJuicyMeme - thanks for flagging this. As @MetaVars mentioned, there is some performance overhead to using BillboardGui, so its just a question of what the expectation for how much overhead there should be.
We have ongoing performance work on UI, and there are areas for improvement for Billboard GUI for sure. Please create a feature request with the same details listed here for us to track!
We feel feature request would be better for tracking, since bugs typically require some clear expected result, which is harder to define here.