-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
perf: reduce repaints amount caused by selection #4889
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.
clang-tidy made some suggestions
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.
Aside from the segfault, this PR works for me. You really notice the absence of re-layouts when selecting in debug builds 👍.
Nit: This PR reduces the amount of (re-)layouts performed when selecting, the widget is still repainted (about) 50 times per second.
PR reduces amount of painting while not changing behavior/visuals of text selection
selecting_
bool, only used by triple click selection, which forced layout on each click release.SelectionItem
!= operator which worked like ==, only used by already removedselecting_
so no side effectsChannelView::setSelection
to repaint/emit signal only if selection was updatedtested:
selectionChanged
signal