perform arrayToQPath in chunks#1965
Conversation
"all-finite" includes the case where user requests to skip finiteCheck.
this restructuring removes inter-dependencies between the various modes. this makes it easier to reason about and modify the various codepaths.
this allows us to defer the backfilling
|
@pijyoi the diff looks good, on macOS I'm not seeing any significant difference in performance, which is somewhat odd. I'll test on my windows machine as well. For the sake of my record, after cherry-picking the benchmark file, and running on master, these are the results I got: EDIT: removed bogus results |
|
You may want to run it on Qt6. |
oh you know the issue is, I was using EDIT: confirmed, it ran on master, and if I copied + pasted one more line from my console output, that would have been obvious 🤦🏻 I'm re-running now. |
|
this PR master branch |
|
@pijyoi I was about to point out that I'm not noticing much difference on the speed test results, but after cranking up the samples on PlotSpeedTest.py (love that use of parameter tree btw, thanks for that!) you can notice a difference in FPS between master and this PR. Looking a bit more closely at the results, you seem to have narrowed the gap significantly in terms of performance difference between PyQt6 and PySide6, to the point they're indistinguishable. |
|
Your results show "pairs" to be markedly slower on PyQt6 (at 1e6 samples) despite no binding-specific code. |
saw that too, but look at the +/- values, there looks to be some uncertainty about those test results. for the fun of it, I ran PlotSpeedTest.py with 1e6 samples and profiled the results after 100 updates; attached is the image of the time spent; I won't bother including the image for I'm going to leave this open for a bit to give anyone else an opportunity to comment 👍🏻 |
|
I am not sure why, but the CI failure logs for Windows / Python 3.7 / {PyQt, PySide} show that matplotlib-3.4.3.tar.gz got downloaded and built... |
|
Looks like matplotlib just released that version, possible the relevant wheels weren't available when the CI ran. I'll rerun when I hop on a computer. |
|
Thanks for the PR @pijyoi this LGTM, merging. I didn't think there was room to make If we want to speed up line-plots any more, I suspect the next place to do it is in the downsample methods in Thanks again! |

This PR optimizes
arrayToQPath()with the following techniques:The code was restructured and refactored to allow easier reasoning and to prevent changes in one mode from affecting another mode. Despite the larger code, I believe that the code is easier to follow now than before.
master (PySide6 / Windows)
this PR (PySide6 / Windows)