Here are the steps to experience what I’m referring to:
– Create a parent comp
– Create child comp inside it
– Create square inside child comp
– Set expression for rotation of that square (This does a 100,000 iteration for loop which pushes the CPU as a complex expression would.)
//////////
val = 0;
for( i=1; i <= 100000; i++){
val = i;
}
transform.rotation = val;
//////////
The square won’t move, the point is just to emulate fairly demanding expression code. Now go play from your parent and you’ll see it of course grind away as it generates the ram preview and then play smoothly once it’s in ram. You’d think that it was now done with processing the contents of that child comp but it isn’t so. If you make the precomp 3D enabled, add a camera and move the camera slightly and press play again, you’ll see it’s clearly running that child comp expression code again. Why would it do this?
To further clarify what’s going on, add some heavy adjustment layer effects inside your child comp. Notice that when you press play from the parent it will work extra hard for that first time generating the child ram preview. After that, no matter what you do in the parent, it won’t have to process those adjustment layers again until you edit the contents of the child comp. However, the expression code will still run.