Page 1 of 1

T-Engine performance issues

Posted: Mon Mar 25, 2013 9:54 am
by Grey
In Mosaic if you leave the game running long enough it starts to grow in RAM usage, going up to over a Gig. Possible memory leak somewhere? I've had a look and I don't think it's a problem with the sound files, as these come to about 150 Mb as wav files. Possibly an issue with the tiles generation? There are about 100 million possible tiles...

The RAM thing isn't so serious for me as a CPU issue. After some time playing it shoots up to fill 3 of my 4 cores and grinds to a slow pace. Turning off the music and the starry background don't help with this. Could be my poor coding to blame somewhere... Any tips on how to check for something I'm doing hideously wrong? It's a shame because normally the game is blissfully quick, in spite of all my crazy code!

Re: T-Engine performance issues

Posted: Mon Mar 25, 2013 8:47 pm
by darkgod
Hum if it max uses *multiple* cores there are very few culprits, since not many things run in separate threads:
- music
- sounds
- particle effects
- network code

If you removed all music & sound and didnt tuoch the network code the only one left are particle effects.
It is easy to make immortal particles that will keep on running (as in being computed, not being displayed) forever

Re: T-Engine performance issues

Posted: Mon Mar 25, 2013 9:24 pm
by Grey
Hmm, interesting. Will have a root through...

Re: T-Engine performance issues

Posted: Mon Mar 25, 2013 9:59 pm
by darkgod
?

Re: T-Engine performance issues

Posted: Tue Mar 26, 2013 12:13 pm
by Grey
The only particle effects I use in the game are single instance ones, so not sure what's going on. I do use them a *lot* and very regularly though, as they display the beats of the music on the map.

Some of the enemies have some particle things they use regularly. Maybe I should profile each enemy to see if it's a particular one...

Re: T-Engine performance issues

Posted: Tue Mar 26, 2013 6:54 pm
by darkgod
Yeah it's probably how you add/remove them then yeah