Closed makermelissa closed 4 years ago
good idea, time.monotonic() ftw :)
time.monotonic is now implemented. I'll keep this open for a while longer to continue listing ideas.
A side note on speed improvements: I first tried this repo without numpy installed and a call to image()
lasted around 0.58s, I nearly gave up, until I saw the if/else around numpy in the image function. After installing numpy it only took 0.075s so this is almost 8x as fast as without numpy.
IMO you could/should output a warning when numpy is not available as I was almost giving up this repo because of speed issues.
@philippkeller we should import numpy in the main script to 'force' it to install, wanna submit that as a PR?
I also added a section to the guide the other day suggesting NumPy be installed installed in the setup, but I like the suggestion of just adding an unused import.
I think I'm going to close this. I was able to run this at a good speed on the Pi 4. The latest SPI addition in PureIO really helped and the code is pretty optimized at this point.
I mostly want to list ideas here for performance improvement ideas. The first idea I had is taking the image loading time into account for the delay. At the moment it loads the images, then does a delay. This change should have a significant impact.