-
Rendering time increased by 6 times when expression layer is switched on
Hello Again,
I am coming from this thread:
https://forums.creativecow.net/thread/227/42339
Here Andrei helped me in making an expression to change the color of the text inside parenthesis in a text box.
However, when I render my project in AME, it takes around 18-20 minutes to render in H.264 1080. When I switch off this layer, it hardly takes 2-3 minutes to render entire composition. Can anyone suggest if this is normal, or is there anyway code can be optimized?Thank You!
var t = text.sourceText;
var splitText = t.split("\r");
var regex = /\(([^)]+)(?=\))/g;function indexMatched(index){
var matched = false;
var match;
while ((match = regex.exec(t)) !== null){
matched |= match.index<index & indexmaxIndex){
maxIndex += splitText[i].length;
i+=1;
}
return i-2;
}indexMatched(textIndex+placeInLines(textIndex)) ? 100 : 0;