Skip navigation
Currently Being Moderated

Expressions Optimization

May 17, 2012 6:38 AM

I use a lot of expressions - to a point where I sometimes get stack overrun errors in renders, and other glitches.

 

I am wondering if anyone has advice for optimizing expressions and reducing the amount of redundant calculations.

 

At the moment, the only way I can think of to make a 'comp-level variable', is to create a text layer, calculate something in the 'Source Text' property, and have other expressions refer to that.  For numerical values, I might use a Slider or Point control for the same purpose, depending on the value type.  Does anyone know if this actually helps to optimize expression evaluation?

 

Thanks,

Bryan

 
Replies
  • Currently Being Moderated
    May 17, 2012 8:22 AM   in reply to bryab

    I don't have any test data to back this up, but my experience has been that while there are certain advantages to using controls and text layers to "publish" comp-level variables, efficiency is not one of them. For example, putting the source for a commonly used function in a text layer and using eval() may make for a smaller amount of total code, but it seems to generate a significant performance hit. Again, I haven't done any formal testing--but that's how it seems to me.

     

    Dan

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points