-
Notifications
You must be signed in to change notification settings - Fork 196
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
Avoid redraw animation on StructuredViewer #927
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.
Looks good!
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.
Since the setRedraw mechanism uses a counter internally, this should be completely fine for every client.
You mean "entries" not "markers", don't you? |
The complete sentence was copied directly from the other issue. And yes, the general problem is that there is a refresh after every item removed from the viewer, which becomes very visible when going from a huge list of items to no items at all. This happens/happened in the egit file list, the installed plugins list in about, the launch config selected plugins list, and so on... |
When the a table contains a big amount of entries, selecting another resolution leads to the typical "animated removal" of all contained items on Windows, which fully blocks the UI thread due to redrawing after each item removed. This animation is internal behavior of the viewers and seems something which does note help the user due to screen artifacts which are created and slows down the update process. See also #909
Thanks @Bananeweizen for bring this to our attention, thanks to @laeubi for the feedback to solve this problem directly in JFace and thanks to @BeckerWdf for the review of the commit message. I will be off my machine for the next 3-4 weeks so if something is wrong with this patch, I will not be able to participate in the discussion. |
The code changed in this PR may be called from the non-UI thread so the setRedraw call now introduces a |
@jonahgraham I don't think it strictly introduces one as Viewer#setInput must be called from the UI thread and if implementations do differently they need to handle the case there. |
When the a table contains a big amount of markers, selecting another resolution leads to the typical "animated removal" of all contained items on Windows, which fully blocks the UI thread due to redrawing after each item removed.
This animation is internal behavior of the viewers and seems something which does note help the user due to screen artifacts which are created and slows down the update process.
See also #909