[Q] Memory optimization methods

User avatar
robocop
Fusioneer
Posts: 69
Joined: Tue Aug 05, 2014 12:01 pm
Been thanked: 1 time

[Q] Memory optimization methods

#1

Post by robocop » Tue Dec 12, 2017 7:06 am

Hi there !
Guys, I found some nice (theoretically) methods for "Image" class in fuses, which called "Use()" and "Recycle()".
Fuses_question.JPG
From their description ("Use()" only have one actually) - I assume that it can help me optimize memory consumption which my fuse tool have right now..
My fuse produce some temporal images inside it while processing.. and memeory consumption seems bigger than can be. Because Fusion still keep these temporal images in memory after processing... until I press "purge cache".
So I decide to purge cache manually right inside my fuse tool. And.. so i have found these two methods.
But, unfortunately - seems they just didt`t work :D

So, may be some one know secret ingredient to make them work.
or may be some other ways to release memory inside fuse code ?

thaaanx!


PS:
link to Image class documentation
https://www.steakunderwater.com/VFXPedi ... sses/Image
You do not have the required permissions to view the files attached to this post.

Tags:

User avatar
Chad
Fusionator
Posts: 1265
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 20 times

Re: [Q] Memory optimization methods

#2

Post by Chad » Tue Dec 12, 2017 8:42 am

Those are used to let Fusion know you need an image (or no longer need it). That tells Fusion not to get rid of the image when the tool that made it no longer needs it. Otherwise there would be a lot of thrashing as Fusion cleared memory from one tool when it finished and a downstream tool needed that image again. It doesn't save memory, it increases it, but in a way that is good.

That said, you shouldn't need to use it any more anyway, as Fusion handles memory management for Fuses now much better.

Are the cached images higher priority than you think they should be? If not, then having them in memory isn't really "hurting" anyone (other than other applications who will get displaced as your OS makes room for Fusion).

User avatar
robocop
Fusioneer
Posts: 69
Joined: Tue Aug 05, 2014 12:01 pm
Been thanked: 1 time

Re: [Q] Memory optimization methods

#3

Post by robocop » Thu Dec 14, 2017 1:47 am

Roger that.
Hmm.. really.. I ve recreate similar to my fuse functionalitty via Fusion nodes in flow.. and they eating memory even more then my fuse.. so.. really, i am ok with current results without any further optimization.
Thanx Chad.