Not sure where to put this since i don’t have full access to the dev forum. Anyway here is my issue.
A game of mine is having lag issues for some people that join and i get occasional lag. Not sure where it’s coming from or how to find out what the issue is. Using the performance window im not really sure what “good” values for the stuff they show is so it’s hard to use.
Anyone got any ideas on how to find out where the lag is coming from without cycling through 1000s of lines of code looking and optimizing it
The MicroProfiler is a handy tool in checking performance regarding your game. I myself don’t know how to use it to its fullest extent, but there are several articles on the Wiki dedicated to the MP.
Speaking from a bare perspective without the MP, there could be several reasons as to why your game sees performance issues:
Operating system
Variables not being GCed and hanging in memory
Lack of Destroy on objects no longer needed
Calling expensive functions rapidly
Running loaded loops in quick succession
Backend yields not being respected
Lack of optimization (sorry, you will have to sort through those 1000s of lines or rewrite your code)
Replication (when and when not to use remotes or put things on the server or client, etc)
Can you think of anything?
All of these play a huge hand in determining how well your game performs. In the end though, you’re also going to be weighing your code against a person’s operating system. Sometimes it can’t be helped, but it can be reduced.