Elektrine lite

← Feed

@gperson@social.linux.pizza

Post #866814

2026-03-31 15:48 UTC

Today on Experimenting with #Tenacity: doing something naive and bypassing Tenacity's "backed bitmap" system and instead drawing directly to the screen. Turns out that this MAY actually lead to a small improvement (in the tenths of a millisecond, judging by the Frame Statistics dialog in Tenacity itself), at least on Linux under KDE Wayland. However, Spectrogram redrawing may suffer from a performance hit, but alas, that's broken at the moment due to other reasons (not sure why, but that's usually the theme for things in Tenacity). The next thing to do would be if maybe we could get an improvement over using a regular wxPaintDC by using wxGraphicsContext on Windows. There may still be additional time added because you'd also have to create a wxGCDC, but I"m still interested in such an experiment.

Replies (1)

  • @gperson@social.linux.pizza 2026-03-31 22:51

    I assume that the slight decrease in rendering time for the entire track panel leading this change is because we get rid of a conditional and a function call or two. In other words, we no longer draw to a backing bitmap first and then draw the bitmap onto the display. By directly drawing to the display, we don't have to copy a bitmap from memory onto the display, and hence the little bit of time saved. However, this is on my ThinkPad, which is a pretty new and good-performing laptop, so I'll try on my mom's laptop to see if there's any more notable drop in rendering times. If the time reduced is more, then it may actually be rendering faster rather than just slightly reduced overhead. Also, overlays surprisingly still work (they use the backing bitmap to erase them, but thanks to the way Tenacity's TrackPanel timer is setup compared to Audacity's, it already handles a final pass so overlays are erased).

    Open ##2913038