What does loading 50 times the same Actor does to my memory?

I’m pretty close to having the doors of my dungeon to open and close nicely when I click on them, which is a very nice milestone :smiley:.

I’m worried though: I have quite a lot of doors, all similar for now. Since I don’t want them all to open at the same time, I did not use multiple instances: instead I just call Actor() each time.

Does that mean that I am holding 50 copies of the same meshes, and 50 copies of the same animations in my memory? Or does Panda realize that I’m accessing the same resource 50 times and therefore does something smart?

Later, I’m going to add monsters, and these will be greedier than doors…

I’m not trying to do some early optimization, but I’m wondering.

It’s loaded and stored once, assuming it’s the same egg.

Panda will still animate the vertices of every actor individually, unless you use instancing. If you have a lot of individually animated actors running around, it could get heavy on the CPU. If it gets a problem (use PStats to find out how much time Panda is spending animating the vertices), you should try to reduce the complexity of the animations.