Summary: | Many redraws in some cases where one redraw should be sufficient | ||
---|---|---|---|
Product: | PulseView | Reporter: | Uwe Hermann <uwe> |
Component: | Performance | Assignee: | Nobody <nobody> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | soeren |
Priority: | Normal | ||
Version: | unreleased development snapshot | ||
Target Milestone: | PulseView 0.5.0 | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | Repain debug patch. |
Description
Uwe Hermann
2018-05-19 21:03:50 CEST
Where exactly did you add the paint_mid()? If you added it to LogicSignal then 16 would be perfectly acceptable if you have 8 channels enabled since every channel is drawn separately. ...the qDebug(), I mean. Created attachment 437 [details]
Repain debug patch.
I attached my test patch. It's possible that I misinterpreted the output, you're probably in a better position to double-check if all output looks correct for all situations (on logic channels, only analog, logic+analog, clicking in white space, clicking / moving the mouse to certain areas like ruler etc. etc.). Yeah, it's like I assumed: as each trace/signal is painted independently, one paint action of the view results in 8 LogicSignal paints if you have 8 channels enabled. This is why you see multiples of 8 in your output. If you want to catch the "main" paint event, check out ViewPort::paintEvent(). If you see multiple paints there, we should investigate. Otherwise I'd say this bug can be closed. Yep, I've played around with this some more and I'd say the issue can be closed. The only somewhat surprising thing that remains, is that a single click (no drag, no zoom, etc.) in the "white" area (where there are no traces) triggers redraws at all, since nothing on the screen has to change due to that click (currently). The same goes for simply moving the mouse in the white area (triggers Viewport::paintEvent() calls from what I can see), whether or not there are channels enabled at all. It's not a big deal performance-wise though, and technically some features could require these redraws (now or later), e.g. highlighting stuff depending on mouse position etc. |