Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions In theory, how many times will this code run

  • In theory, how many times will this code run

    Posted by Jakob Wagner on June 9, 2017 at 10:54 am

    Hi

    OK. A crazy Friday experiment. Basically I’m trying to optimise the way I execute expressions.
    It doesn’t really matter what the code does, this is about the structure of it.

    I have a text layer. In Source Text I have this expression:

    var numLayers = 3;
    var scaleString = "[";

    for(var i=0;i data[index-1];

    So, the big question is: How many times will the code in the Source Text property run? Once? Or once for each shape layer referencing it?

    Did that make sense? Let me know if not.
    Here is a example download: https://f1.creativecow.net/file/11432/11432_testloop.aep.zip

    Thanks,
    Jakob

    Jakob Wagner replied 8 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Xavier Gomez

    June 9, 2017 at 6:55 pm

    What is sure is that the string is build at least once for the text layer, and is evaluated three different times, once per shape layer.
    Now, is the string rebuilt everytime it is required by one of the shape layers, that’s a question i always wondered about. I would say no, but that’s just a guess. Only an Adobe engineer could answer i think. Or maybe Dan!

    Xavier

  • Jakob Wagner

    June 14, 2017 at 9:07 am

    I guess it will be left to the unknown for now. No matter what the answer is, it never really gave me any performance improvement any ways.

    Thank you for answering. 🙂

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy