Page 12 of 13
Re: Grimm's take on the turntable anim script
Posted: Mon Jun 23, 2014 4:48 pm
by grimm
Thanks

But this shouldn't be necessary as the garbage collector runs automatically. Unless you are doing some extreme memory or table usage, or Octane is interfering with the collection it shouldn't be needed. I will do some profiling but I'm thinking that these scripts don't use enough memory that makes it necessary to force a collection. Maybe Thomas can add his thoughts to this?
Jason
Re: Grimm's take on the turntable anim script
Posted: Mon Jun 23, 2014 8:20 pm
by stratified
You're right Jason, there should be no need to kick the garbage collector from the script. The whole point about garbage collection is to make sure that programmers don't have to worry about this. Garbage collection itself doesn't come cheap either.
Of course, there's nothing against trying to optimize garbage collection for your script. More info on that
here.
@gmillas: can you provide me with an example script where you see those big memory spikes?
cheers,
Thomas
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 4:37 am
by grimm
Thanks Thomas,
I ran a simple profile on the turntable script using Octane version 2.01 and these are the results in Kilobytes. All I did was put
in the code at various places.
Code: Select all
220.361328125 <- start of the script
281.533203125 <- start of animation preview
312.0107421875 <- cancel of preview
217.806640625 <- start of animation preview again, looks like the garbage collector ran
318.2080078125 <- cancel of preview
348.650390625 <- another animation preview
307.3134765625 <- cancel and maybe another garbage collection
This isn't probably a real good method to do the profile, but it at least give us an idea on what's happening as the script runs.
So, at the most, the memory usage rose up to 348 KBytes of memory but the garbage collector appears to be working as it should.
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 7:11 am
by gmillas
did you run a whole render turntable with 1920x1080 and 400 frames ?
i did that and at 275 memory use of octane.exe was 2 gb ( with not much intesive scene i will post today a screene shot with that...
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 7:58 am
by gmillas
I dont know if i am doing something wrong but have a look ->
Here tou go : without collectgarbage() -- original grimm script
with collectgarbage()
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 8:04 am
by gmillas
And this memory spikes are always at the render loops ( mine and grimm's )
any thoughts ?
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 8:22 am
by grimm
Hmm, very strange, I have no idea? Thomas?

I wouldn't think that the Lua garbage collector could affect Octane's memory usage at all? There must be some other mechanism at work here.
Re: Grimm's take on the turntable anim script
Posted: Tue Jun 24, 2014 8:41 am
by gmillas
and if you have a limite of 4GB on your system at some time it would be unsuable ...... no memory on your system .....
thoughts
the scene i posted is very simple 5 textures and 4078 tringles ... 4 meshes
nothing exotic ... simple things ....
Re: Grimm's take on the turntable anim script
Posted: Wed Jun 25, 2014 10:31 am
by gmillas
I have a request .
Can you add a render frame selection
from frame -> to frame ?
thanks
Re: Grimm's take on the turntable anim script
Posted: Fri Jun 27, 2014 6:28 am
by grimm
That's a good idea, I will add that in this weekend. Thanks,
Jason