Skip to main content
Omal Mastifa
Participant
October 28, 2021
Answered

CEP API performance questions

  • October 28, 2021
  • 1 reply
  • 349 views

Hi,

 

I'm looking into creating some sort of a Git for the PPro sequences using CEP and ExtendedScript, but I am concerned about the performance.

For example, in my testing it takes around 1ms to access one clip object from the first video track of the active sequence (I am not caching variables here for example purposes)

app.project.sequences[0].videoTracks[0].clips[0]

 and around 1.5ms to access a property of a component of a clip (again, not caching variables here for example purposes)

app.project.sequences[0].videoTracks[0].clips[0].components[2].properties[7]

All the times have been tested by evalFile-ing my JSX file with the code. Here's the code that does the profiling

var time = 0;
var len = 1000;
var ___i;

for(___i = 0; ___i < len; ___i++){
    $.hiresTimer;
    app.project.sequences[0].videoTracks[0].clips[0].components[2].properties[7]
    time += $.hiresTimer;
}

var avgTime = time / len;

 

On a farely large sequence (around 200clips, each with effects and some keyframes), just iterating through all tracks, clips, components, properties and keyframes takes around 40 seconds, time in which the JSX core is completely blocked.

 

There's also a concern about performance degradation. The more I run the code which fetches all the sequent's info, the slower it gets (relative to the size of the sequence). I've tried to run `$.gc()` a couple of times in between the fetches, but to no avail. 

 

Is there a way to get the sequence's data in a faster manner? Should I not be using the ES Core for DOM accesses? 

This topic has been closed for replies.
Correct answer Bruce Bullis

There is no faster method; I'm not sure what "ES Core" is.

 

in what version were you testing?  We've improved performance somewhat, in 22.0z

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
October 28, 2021

There is no faster method; I'm not sure what "ES Core" is.

 

in what version were you testing?  We've improved performance somewhat, in 22.0z

Omal Mastifa
Participant
October 28, 2021

By "ES Core" i was refering to the engine which runs the ExtendedScript. I'm sorry for the confusion.

I am testing and working in PPro 15.4