Page 1 of 1

[0.15.x] rechart slower than in 0.14.x

Posted: Fri Apr 28, 2017 12:25 am
by osldgoth
My EMC mod calls the game.forces.player.rechart() function. In 0.14.x, the function takes about 20 seconds to work, while in 0.15.x it takes 2 minutes 23seconds* to work on the same save(attached). have you devs un-optimized something or is it all the new map overlay stuff that was added that is slowing it down?

* 7 times slower!

Re: [0.15.x] rechart slower than in 0.14.x

Posted: Fri Apr 28, 2017 3:42 am
by Rseding91
In 0.14 it was bugged so that the number of players changed how fast it would re-chart. that was fixed and now it's a constant speed regardless of the player count.

Your map happens to have exactly 7 players In it so a 7x slowdown is exactly expected.

Re: [0.15.x] rechart slower than in 0.14.x

Posted: Fri Apr 28, 2017 7:22 pm
by db48x
If the speed no longer varies based on the player count, why is a 7x slowdown expected?

Re: [0.15.x] rechart slower than in 0.14.x

Posted: Fri Apr 28, 2017 7:33 pm
by db48x
Oh, you're saying that the game is supposed to rechart a fixed number of chunks per tick, but that in 0.14 it actually recharted a fixed number of chunks per tick per player? That would seem to fit your explanation.

Re: [0.15.x] rechart slower than in 0.14.x

Posted: Fri Apr 28, 2017 7:58 pm
by Rseding91
db48x wrote:Oh, you're saying that the game is supposed to rechart a fixed number of chunks per tick, but that in 0.14 it actually recharted a fixed number of chunks per tick per player? That would seem to fit your explanation.
Yes.

Re: [0.15.x] rechart slower than in 0.14.x

Posted: Mon May 01, 2017 4:50 am
by osldgoth
Would you consider speeding rechart up then? not that my mod will call it very often. with my computer, 7x faster didn't slow the game ticks any (perhaps on less powerful machines it does effect the fps?). 2-3 times faster should be fine. do you have any other options? I could make my own rechart function and let it run as fast as I want...