ID:2561410
 
How much lag does the statpanel actually cause on BYOND games? I've been thinking about this for awhile now.

So, honestly, I want to use as many built in functions BYOND has as possible. The statpanel serves those purposes just fine IMO.

I also avoid using the interface editor as much as possible because I'm not a huge fan of it. I don't really see why I should bother piecing together my own statpanel with the interface editor when statpanel() already exists.

I was thinking about simply using the interface editor in a way that allows players to call the statpanel when they want and otherwise it's hidden and simply sleeps.

Would this even have any sort of noticeable effects on the game at all? Is it even worth it in the long run? Or would doing it that way actually cause more lag?

On a side note, the statpanel is used primarily for two things, character sheet and inventory. So far there are very few, if any verbs and I want to keep it that way. No animated icons in the statpanel and I have no plans on using a tab for a "who" list for the game.
statpanel()'s overhead directly relates to how much processing the Stat() proc is doing. So if you're displaying a lot of stuff it's going to get slower the more you display.

It's also called on a loop, so you need to be sure you're not doing any processing you shouldn't by doing things like surrounding your statpanel() calls in if().

It's not nearly as friendly for non-standard usage like a grid (or displaying literally anywhere else), but works fine for what it's made for -- displaying basic stats. If you're leveraging it for much more you should probably consider taking a different route.
Alright, thanks for the insight Nadrew. Sounds like I don't need to worry about it then.
In your case it should be fine, yes. But you should be wary about inventory size, showing full objects within statpanels is one of the heavier things it does, and a large list of them can get problematic.
Ideally you could just call an update to your interface whenever something happens that would warrant an interface update
if(statpanel("Title"))


Doing this will only process the tab you're currently on.
Helps with CPU usage a bit.
Well I wasn't planning on limiting inventory space, but maybe I will now.

I'll also look into the statpanel thing, thanks Kozuma.

I appreciate the input!