I'm developing an audio oscilloscope-type program, which outputs frames as raw bytes to ffmpeg and ffplay (which plays back video and audio together, synchronized). I can also tell ffmpeg to output to file instead.
Originally I used matplotlib. I tried switching to pyqtgraph because I thought it would be faster.
Unfortunately it ended up too slow for my use case.
- Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, turbo 2.70GHz
- Windows 10 x64 (I can try Kubuntu 18.04 later)
- Miniconda Python 3.6.6
- pyqtgraph 0.11.0.dev0+g2e69b9c
I adapted pyqtgraph's speed test to resemble my data more closely (hide all axises, no title, don't write fps to canvas):
In my own app rendering tests, I usually get 50-120fps, depending on data and number of plots. In any case, this is far worse than matplotlib with axis drawing disabled (118-158fps).
In either case, stopping in PyCharm (which sends Ctrl+C) results in "Process finished with exit code -1" instead of a stacktrace, which prevents me from taking a cProfile snapshot of my above speed demo.
I attached 2 cProfile logs. I closed the GUI after an approximate amount of time, and terminated the QImage code using "for i in range(600)".