Thanks for the info about print causing this, it was really helpful when looking into this.
So it turns out this isn’t actually caused by the SettingsHub at all, it’s caused by the Developer Console module which is required by the SettingsHub script. The main problem is that the developer console re-draws the output log when not on screen, a secondary problem is that this seems overly slow (it causes noticeable lag when outputting 10 messages in one frame).
I know that there is a developer console re-write coming up soon so I made the minimally invasive fix of just not re-drawing the output log when the developer console isn’t visible.
Here is the pull request, hopefully @spotco or @24RightAngles could look into merging this or committing a similar change internally.
I thought the dev console was written so that it didnt start running until the first time the user presses F9 but that doesnt seem to be the case from what Im seeing.
I think only users with edit access are getting this spike from what I can tell
Each tab in the dev console was designed to only start up once the tab is clicked. I’m not sure what happened since I redid it up years ago. It causes so much lag.
What is SettingsHub and why does it lag my game? As you can see render and physics are done extremely quickly in this screen cap, but the SettingsHub is not ideal at all.
My game is extremely volatile to lag spikes, causing massive problems for gameplay. I’m using PGS and using rotating objects BodyGyro and BodyPosition
The same just happened for me. I launched my game from the website and ran around for a bit. I’m not sure what triggered it, but a few minutes in I suddenly started getting lag spikes. I haven’t been able to reproduce.
I found the cause of this I believe a while ago and I thought I posted it here but I guess not. The issue happens once you’ve reached a certain amount of prints to the server and as such only causes lag on the developers client. The longer the game is open, the worse the issue will become
Once I realized this was my issue I just went and cleaned up my prints to output and it went away
My best guess is that at a certain number of prints the developer console will just shift up the text to the next line instead of shifting the guis themselves.
This appears to be very bad for performance because setting the Text and other gui properties of hundreds of guis is not a fast operation – and it’s happening every time a print is made. This can happen not just with server output but with client output too, as seen in the linked thread.
For now you can just reduce the number of "print()"s you call in your game and it will fix the lag. Good thing too is that if all of your prints are being called from the server, you’re the only person who will experience that lag anyways