Tips for investigating memory leak / bottlneck? (scripting / SDK)
Hey, wondering if anyone expert in the SDK can advise on an issue I'm having.
First and foremost, I am using Python to automate workflows in Premiere using a package called Pymiere.
I have a function that loops through an array of ~180 image paths, imports each, and places them on the timeline one at a time. The operation works, but is SLOW and gets slower and slower as the loop progresses, until it is basically at a standstill and I terminate the process. For what it's worth, the way Pymiere works is it basically compiles python into ES and sends it to a local server that controls Premiere.
The obvious inneficiency is that each call of the "insertClip" function is actually compiling a unique ES script and sending it to premiere. It is not a single batch call. But 180 individual calls. Memory management, "garbage collection" etc is beyond my current understanding, but it feels like it could be something to do with that.
I am hoping that this issue lends itself more generally to SDK troubleshooting and not specifically unique to Pymiere, but it may well be a Pymiere issue. In any event, I figure this community may have sone insights!
Does anyone have any thoughts on where a memory leak or bottleneck might occur in a workflow like this? Or how to even troubleshoot it?
Thanks.
