mInternauta / AgroSponsor

Its a Farming Simulator 2015 Mod, This mod adds a sponsors for your farm, every day in the morning you have the chance to win a sponsorship of AgroSponsors and its partners to purchase equipment and tools.
GNU General Public License v2.0
0 stars 2 forks source link

Too many aggressive calls to `fileExists()` #2

Closed DeckerMMIV closed 8 years ago

DeckerMMIV commented 8 years ago

May I suggest that you refactor the checks that is done in AgroSponsor.LUA here and here.

Calling fileExists() at each-and-every frame update (like 60 times a second) really causes FPS drops and bad performance.

It should suffice to check the existence of a file, only when the player actively chooses to save his game-session.

mInternauta commented 8 years ago

in fact you're right, but the reason for the AutoSave and precisely because in some situations the Save event is not triggered and does not save the data from AgroSponsor

Enviada do meu iPhone

Em 26/03/2016, ?s 10:05, "DeckerMMIV" notifications@github.com<mailto:notifications@github.com> escreveu:

May I suggest that you refactor the checks that is done in AgroSponsor.LUA herehttps://github.com/mInternauta/AgroSponsor/blob/master/src/AgroSponsor.lua#L167 and herehttps://github.com/mInternauta/AgroSponsor/blob/master/src/AgroSponsor.lua#L175.

Calling fileExists() at each-and-every frame update (like 60 times a second) really causes FPS drops and bad performance.

It should suffice to check the existence of a file, only when the player actively chooses to save his game-session.

You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/mInternauta/AgroSponsor/issues/2

mInternauta commented 8 years ago

I will check that soon

Enviada do meu iPhone

Em 26/03/2016, ?s 10:05, "DeckerMMIV" notifications@github.com<mailto:notifications@github.com> escreveu:

May I suggest that you refactor the checks that is done in AgroSponsor.LUA herehttps://github.com/mInternauta/AgroSponsor/blob/master/src/AgroSponsor.lua#L167 and herehttps://github.com/mInternauta/AgroSponsor/blob/master/src/AgroSponsor.lua#L175.

Calling fileExists() at each-and-every frame update (like 60 times a second) really causes FPS drops and bad performance.

It should suffice to check the existence of a file, only when the player actively chooses to save his game-session.

You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/mInternauta/AgroSponsor/issues/2