• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code instance_activate_region causing massive performance problems

P

PlayMr300

Guest
Hi,

(First of all sorry for my bad english, english is not my native language)

I just downloaded and installed the newest version of GM:S 2 (2.0.7.171).
Everything went fine until I started my game.
When was ingame, I noticed some framedrops causing lag spikes on my game.
So I restarted the game but this time in debug mode so I could see what caused the lag.
When I looked for the cause I saw that the "instance_activate_region" function was taking almost 15% of my render time (before the update it used around 0.5%).

I attached some screenshot to show how it looks like.
 

Attachments

rwkay

GameMaker Staff
GameMaker Dev.
Please file a bug and include an example project so we can take a look, we did fix a bug around this area where instances were not being considered (but they should have been) which may explain some of the time loss (as it is doing more work) we can look to see what is causing the slow down in your project and either optimise our code or let you know what could be done to make it faster for you.

Russell
 
P

PlayMr300

Guest
Ok, I filled a bug report and posted a link in it where you can download my project file.
For now, I switched back to runtime version 2.0.6.96 where it all works perfectly, so I can continue working on my game.
 

rwkay

GameMaker Staff
GameMaker Dev.
I have fixed this internally - turns out an earlier bug fix (to ensure that all instances were considered) uncovered an unneeded linear search that caused the slow down.

It will be in the next public build

Russell
 
J

jcavaliere

Guest
I have fixed this internally - turns out an earlier bug fix (to ensure that all instances were considered) uncovered an unneeded linear search that caused the slow down.

It will be in the next public build

Russell
Do you have an ETA on this? I think I'm running against the same problem. Is the current workaround still to install a previous version?
 
Top