Closed sakertooth closed 1 week ago
Pretty decent performance! Though I'm seeing some bugs
The sample zoom jitter is still there:
https://github.com/user-attachments/assets/0fc81c40-4b5d-460e-8d6e-c5b629395b8e
Some sample shape artifacts when zooming:
https://github.com/user-attachments/assets/21f8825c-9fe2-4ffb-869e-d556860b3ab5
Waveform not being drawn in SlicerT (or you haven't drawn it yet):
Incorrect rendering in AFP:
https://github.com/user-attachments/assets/f8a4765f-dd0e-415a-b0fb-7a976df7b30d
Also iirc, this one also uses more ram, but it's not a big problem.
Have you tested how this compares to my implementation?
If you don't mind, I'll push some fixes
If you don't mind, I'll push some fixes
Yeah, that's fine with me.
@khoidauminh, I tested your PR. I don't remember the implementation being that good, wow. I think I might close this PR actually and continue contributing to what you have over there. And the ideas we did here are the same, at least in terms of caching, but I'm shocked at how the continuous scrolling is that fast with your PR.
@sakertooth Damn thank you
Though I think my PR is only faster because I clipped rendering to the visible region
This PR did make me realize how messy my code still is lol. I'll see what I can clean up
This PR is meant to improve performance when drawing sample waveforms by:
That's about it. I do want to note that when stretching sample clips vertically and using continuous scrolling, there is still a major drop in performance due to the drawing that's being done on the CPU. In the future, we should migrate such drawing to be done by the GPU using something like OpenGL.
Below is an attachment for the results of
perf
when sampling cycles in the scenario stated above: as shown, most of the overhead in this case lies within the Qt library itself, more specifically its software rasterization that is done on the CPU.I have also omitted RMS calculations from the waveform visualization since most DAWs (and now even Audacity when using default settings) don't consider this, and I wanted to prioritize more performance.