Ronchon
Member
After updating from v 1.4.1657, i've been experiencing game freezes.
In places where my game didn't freeze at all, it now freezes for more than 30 seconds!!
After diagnosing, turns out the ds_grid_get function itself seems to be more than 30 times slower than in the previous version, causing this 30 sec freeze for something that used to barely take a second before...
Of course, as usual, impossible to downgrade as there's always problems with gamemaker when downgrading.
Seems that licensing is now simply broken in v 1.4.1657 as i'm unable to properly activate GM and get a licensing request at every start ( and yes i tried multiple times to uninstall everything and delete all appdata folders etc.. ).
So i'm apparently stuck with this version that has broken ds_grids.
Here is a quick test to confirm the ds_grid_get were abnormally slow, though i can't actually test it with previous version and prove the difference.
On my machine this test outputs 1280ms, for about 38000 ds_grid_get .
In previous versions this was pretty much instantaneous and causing no significant freeze.
If someone still uses v 1.4.1657 i'd be interested if they could run this code and give the time they get ( though obviously it also depends of the PC spec ), as i'm unable to revert back and get the exact value.
EDIT:
I ran more tests and it gets even weirder.
//test 1 ( ds_grid_get with constant coordinates ): result < 10ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
val = ds_grid_get(g,10,10)
n+=1
}
}
show_message("test 1 time = "+string(current_time-t_start)+" nb "+string(n) )
// test 2 ( using ds_grid_get without 'for' ): result <10 ms
n = 38000
t_start = current_time
g = ds_grid_create(140,280)
repeat(n){ds_grid_get(g,10,10)}
show_message("test 2 time = "+string(current_time-t_start)+" nb "+string(n) )
//test 3 ( using 'for' without ds_grid_get ): result < 10 ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
n+=1
}
}
show_message("test 3 time = "+string(current_time-t_start)+" nb "+string(n) )
//test 4 ( ds_grid_get with random coordinates independent from " for " statement ): result < 20 ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
ds_grid_get(g,irandom(100),irandom(100))
n+=1
}
}
show_message("test 3 time = "+string(current_time-t_start)+" nb "+string(n) )
Test 1, 2, 3 and 4 output results below 20ms. Which is pretty much the expected amount of time these kinds of operations used to take on my machine.
As we can conlude with the test 1 to 4, weirdly, it seems to have to do with ds_grid_get using variables of the 'for' statements or something...
Anyway there's definitly something broken here, and the difference is so huge it simply makes my game out of order.
I need a fix urgently considering i couldnt downgrade!
In places where my game didn't freeze at all, it now freezes for more than 30 seconds!!
After diagnosing, turns out the ds_grid_get function itself seems to be more than 30 times slower than in the previous version, causing this 30 sec freeze for something that used to barely take a second before...
Of course, as usual, impossible to downgrade as there's always problems with gamemaker when downgrading.
Seems that licensing is now simply broken in v 1.4.1657 as i'm unable to properly activate GM and get a licensing request at every start ( and yes i tried multiple times to uninstall everything and delete all appdata folders etc.. ).
So i'm apparently stuck with this version that has broken ds_grids.
Here is a quick test to confirm the ds_grid_get were abnormally slow, though i can't actually test it with previous version and prove the difference.
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
val = ds_grid_get(g,sc_x,sc_y)
n+=1
}
}
show_message("test time = "+string(current_time-t_start)+" nb "+string(n) )
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
val = ds_grid_get(g,sc_x,sc_y)
n+=1
}
}
show_message("test time = "+string(current_time-t_start)+" nb "+string(n) )
On my machine this test outputs 1280ms, for about 38000 ds_grid_get .
In previous versions this was pretty much instantaneous and causing no significant freeze.
If someone still uses v 1.4.1657 i'd be interested if they could run this code and give the time they get ( though obviously it also depends of the PC spec ), as i'm unable to revert back and get the exact value.
EDIT:
I ran more tests and it gets even weirder.
//test 1 ( ds_grid_get with constant coordinates ): result < 10ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
val = ds_grid_get(g,10,10)
n+=1
}
}
show_message("test 1 time = "+string(current_time-t_start)+" nb "+string(n) )
// test 2 ( using ds_grid_get without 'for' ): result <10 ms
n = 38000
t_start = current_time
g = ds_grid_create(140,280)
repeat(n){ds_grid_get(g,10,10)}
show_message("test 2 time = "+string(current_time-t_start)+" nb "+string(n) )
//test 3 ( using 'for' without ds_grid_get ): result < 10 ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
n+=1
}
}
show_message("test 3 time = "+string(current_time-t_start)+" nb "+string(n) )
//test 4 ( ds_grid_get with random coordinates independent from " for " statement ): result < 20 ms
n = 0
t_start = current_time
g = ds_grid_create(140,280)
for(sc_y=1;sc_y<140;sc_y+=1)
{
for(sc_x=1;sc_x<280;sc_x+=1)
{
ds_grid_get(g,irandom(100),irandom(100))
n+=1
}
}
show_message("test 3 time = "+string(current_time-t_start)+" nb "+string(n) )
Test 1, 2, 3 and 4 output results below 20ms. Which is pretty much the expected amount of time these kinds of operations used to take on my machine.
As we can conlude with the test 1 to 4, weirdly, it seems to have to do with ds_grid_get using variables of the 'for' statements or something...
Anyway there's definitly something broken here, and the difference is so huge it simply makes my game out of order.
I need a fix urgently considering i couldnt downgrade!
Last edited: