Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelise animation frame drawing #26

Open
johnlees opened this issue Oct 18, 2021 · 0 comments
Open

Parallelise animation frame drawing #26

johnlees opened this issue Oct 18, 2021 · 0 comments
Assignees
Labels
code Changes to code

Comments

@johnlees
Copy link
Member

This is a bit of a pain because to do this in python we need to use process_map, but this requires all arguments to the mapped function can be pickled. Pickling is possible in pybind11 (see https://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support) but seems to be designed for binary streams, which would result in many large copies. Using shared_ptr didn't work out in my attempts.

An alternative is to load everything into numpy and use python shared memory. This doubles memory use, and is a big faff.

Perhaps a practical alternative is just to wrap a raw pointer in a class, and be careful how you use it.
It's a fairly marginal gain as the ffmpeg encoding takes ages (single threaded) anyway.

@johnlees johnlees added the code Changes to code label Oct 18, 2021
@johnlees johnlees self-assigned this Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Changes to code
Projects
None yet
Development

No branches or pull requests

1 participant