ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Tips to optimize your expressions - Which expression to avoid?

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Remi Monedi
Re: Tips to optimize your expressions - Which expression to avoid?
on Apr 9, 2020 at 7:33:54 am

We know AE updates the result of an expression at each frame of the composition and sometimes we don't need this constant updating, it can affect the preview/render time.
I found 2 ways of limiting an expression's execution to exactly once :

METHOD 1
By adding the comment : // cacheCompareSamplesPerSecond 0
It works since AE CC2014, but it seems it's a bit tricky to use : "Anything complex or potenially dynamic, and the line would disable itself it seemed."
https://forums.creativecow.net/readpost/227/39686

METHOD 2
Add this expression : posterizeTime(0);
Works since AE 2020, a different use for the classic posterizeTime function.

I was not able to make the 1st method work with my project and for the 2nd, I just made a quick test and it's working.
Did you ever used one of these methods? Do you have any thoughts on this?

// METHOD 1
// cacheCompareSamplesPerSecond 0

// METHOD 2
posterizeTime(0);


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]