Skip to content

Conversation

@bzczb
Copy link
Contributor

@bzczb bzczb commented Apr 12, 2025

Helps with performance in #2395 test to some extent.

If you check the ndarray.flags of certain frames, you see that OWNDATA and C_CONTIGUOUS are sometimes false, which I think is slowing down something in PIL a lot. The copy is improving performance on the #2395 test by about 3x for me, on OS X ARM.

@OsaAjani
Copy link
Collaborator

That's interesting, I will have to give it a deep dive to understand what is happening deep down before I can validate though

@OsaAjani OsaAjani added the performance Speed/performance of code or individual functionality. label Jun 20, 2025
@OsaAjani OsaAjani marked this pull request as draft June 20, 2025 13:18
@OsaAjani
Copy link
Collaborator

Hi, could you provide some example code + media that illustrate the performances gap ? I would like to try and reproduce and see how pr #2490 influence this.

@bzczb
Copy link
Contributor Author

bzczb commented Jul 28, 2025

Hi, could you provide some example code + media that illustrate the performances gap ? I would like to try and reproduce and see how pr #2490 influence this.

It was the example given in #2395. I ran the same moviepy2 example twice, with the only difference being the change in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Speed/performance of code or individual functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants