FORUMS: list search recent posts

Expression code in cached pre-comp slows down parent comp

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Maric
Expression code in cached pre-comp slows down parent comp
on May 28, 2018 at 1:57:58 am

Hi there, I have some nested precomps which have a fair bit of complex expression code and even though the precomp is being cached it seems that complex code still slows down the parent comp. Does expression code in nested precomps still run? If so, how can I make it stop doing that? The code doesn't need to run at all once the precomp is cached.


Return to posts index

Robert Maric
Re: Expression code in cached pre-comp slows down parent comp
on May 28, 2018 at 2:28:06 am

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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]