-
Notifications
You must be signed in to change notification settings - Fork 5
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
this package is slow af ! #9
Comments
As it turns out, pyo3 can't break the GIL. Instead python All tests are passing and things seem to be working, but I haven't done any for-real testing yet. I also need to come up with some kind of feedback loop where the program decides whether it should create a process for a frame or run on the main process. Probably do something like if frames > 100 run 10 of the frames sync and then 10 frames async and compare the rates, then do the rest of the frames as the winner. That |
I can barely wait the 15 minutes it takes for this to cook 300 frames, and I built it! It's like having an ugly baby: you love it with all your heart, but deep down you know that people who download your child are going to wonder why it can't cook 300 frames in 14 minutes.
Some directions for improvement:
__main__.py
functions (cook dir/file)in rust: use pyo3 allow_threadstoignore GIL andcook multiple frames at once.A python parser should probably dump its parsed vars to a rust pyfunction.It is important to get this correct now because it's the most annoying part of the package to write.Quantize
andThreshold
(Sort
would benefit and pretty easy)Quantize
specifically may benefit from being reimplemented with an ndarray and using rayon to parallelize. See Investigate possible performance gains okaneco/rscolorq#8 that I bothered the author into openingThe text was updated successfully, but these errors were encountered: