-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't force-refresh center view on side panel refresh #18179
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, probably better to remove this callback at this point.
@AlicVB : Maybe you want to comment about this as it is probably a code done when you rewrote the lighttable ? |
The intent was to make the "arrows" pointing from paragraphs on the documentation screen to the modules they relate to (import, collections, styles) update if the modules get moved around/scrolled/expanded. I messed up here and don't remember why I thought testing for -1 would be a good indication that the "empty collection" text was currently being displayed (in which case redrawing the central area is quick). Can't look at it today unfortunately. |
@dterrahe, you're right, the arrows no longer update as modules are expanded and collapsed. I think I have a fix, let me give it a try. |
Release notes:
|
It should be set to -1 here, if current collection not empty. darktable/src/dtgtk/thumbtable.c Line 1332 in b0d9885
not sure why you see it being zero always. Maybe needs to be (re)initialised when changing views? I was trying to avoid (possibly costly) full checks for an empty collection for each side panel refresh that you've now had to implement... |
Given this last implementation I'm more inclined to merge this in 5.0.x. Sounds pretty safe. @ralfbrown what's you view on this? (I'll test soon). |
That line sets .width, the callback code was checking .x .... And I see no other code setting .width. |
Either way is fine by me, since it isn't correcting any erroneous results, just reducing wasted CPU cycles. |
Yep, that's an embarrassing mistake. Does changing the check to
not solve the issue for you?
That's done in Anyway, I was worried that calling |
Given that I've recently been working to reduce latency in GUI callbacks, I definitely made sure that the added checks were fast. |
I figured out why redrawn widgets in the side panels were also causing the center view to be redrawn, resulting in 40+% CPU usage (200+% with an active instance of liquify having a large warp) just from moving the mouse over the list of collections in the collection module or over the steps in the history module (both of which produce a fade-in/fade-out effect on the hovered item): the callback function for the Gtk "draw" signal on the side panels was always invoking a redraw on the center view even though it's entirely unnecessary.... With this patch, CPU usage is in the 4-5% range when moving over those modules.
I think the intent was to change the cursor when over the clickable link to the documentation that gets displayed on an empty lighttable, but it also gets called in the other views, and hovering over that link would not invoke the callback on the side panels anyway.
Since that callback is now a no-op, we could remove it entirely. Your call.