Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit calls to collectgarbage causing performance hit #41

Closed
stephenmsullivan opened this issue Jul 11, 2012 · 2 comments
Closed

explicit calls to collectgarbage causing performance hit #41

stephenmsullivan opened this issue Jul 11, 2012 · 2 comments
Labels

Comments

@stephenmsullivan
Copy link

Remove object is explicitly calling the lua collectgarbage calls is causing slowdowns when changing scenes. This is especially true with scene of many objects such as lists of 300 items. If you remove these calls an call this function less frequently, it massively increases app performance. I am not sure but lua may be doing the memory management anyway so these calls should not be needed at all.

@MattiaFortunati
Copy link
Collaborator

Hi,
that was an old call due to the old automatic texture deallocation during objects remove().
Since now texture deallocation can be performed only by calling RNGraphicsManager:deallocateGfx() , I think that force to garbage collection in remove() has became useless.
I was already checking this earlier in the morning and I added this fix to my high priority todo list.
Many others collectgarbage() calls has to be removed/checked in the framework and I have to test and stress RapaNui in order to do so. I'll fix this asap.
Thanks for the issue!

Have a nice day!

@MattiaFortunati
Copy link
Collaborator

Hi,

I've fixed this, I've removed the most of collectgarbage() calls.
RapaNui now collects garbage using Moai and C and only if objects have to be deallocated.
Now everything will work smoother and faster, I tested it ;D.

Have a nice day!

Mattia

(I'll close this issue later, when everything will be on master branch ;D)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants