Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

[Solved in upcoming release] SuperTextMesh.OnEnable() Makes really big spikes in profiler !

A topic by Hope Erin Phillips created May 02, 2018 Views: 71 Replies: 2
Viewing posts 1 to 2
(1 edit)

So I've implemented STM and this is my first time using it and I really like it! But today when I went to do some profiling and debugging I noticed that I was getting quite considerable spikes dropping FR down past 60 on really low intensity scenes (its a VN so really just text boxes). On further inspection I see that when activating and deactivating objects that have a super text mesh component, SuperTextMesh.Rebuild() & SuperTextMesh.set_text() creates a significant lil chunk in my garbage collection allocation.

I was wondering if this is normal behaviour and/or if there is a way to lessen this? I'm still new to optimizing garbage collection so it worries me to have < 60 fps spikes this early in production from just my dialogue system.

Thanks in advance!



Actually, this is being optimized right now! I'm taking a 2 week break from STM to work on a personal project, and handed off STM to a pal to optimize and clean up some garbage. STM was originally made for smaller lines of text like dialogue boxes or UI, but for larger fields or several instances of STM I can imagine this starting to cause problems on some devices.

Either way, Rebuild() being called under OnEnable() is kind of just a failsafe, I suppose it doesn't actually have to be there? I can just imagine it causing unintended behaviour if it wasn't there, so... that's why it's there. I'll forward this to my pal who's working on the GC optimization right now!

Cool thank you! I suppose for now Ill look into disabling Rebuild() from OnEnable() and see if I need it or not in my use.