Optimize BitFlipPanel to suppress flicker when users switch between bit lengths#640
Merged
EriWong merged 7 commits intomicrosoft:masterfrom Aug 26, 2019
rudyhuyn:BitsFlip
Merged
Optimize BitFlipPanel to suppress flicker when users switch between bit lengths#640EriWong merged 7 commits intomicrosoft:masterfrom rudyhuyn:BitsFlip
EriWong merged 7 commits intomicrosoft:masterfrom
rudyhuyn:BitsFlip
Conversation
EriWong
reviewed
Aug 19, 2019
EriWong
reviewed
Aug 19, 2019
EriWong
reviewed
Aug 19, 2019
EriWong
reviewed
Aug 20, 2019
EriWong
suggested changes
Aug 20, 2019
Contributor
EriWong
left a comment
There was a problem hiding this comment.
Looks pretty good. I've left a few minor comments and will approve this once they get resolved. Thanks a bunch for fixing this!
Contributor
Author
|
Note about the new strings:
|
EriWong
reviewed
Aug 21, 2019
EriWong
suggested changes
Aug 21, 2019
Contributor
EriWong
left a comment
There was a problem hiding this comment.
I think I found another small bug in that automation name is not updating when bits are getting flipped. Aside from that, your fix looks good to go.
EriWong
approved these changes
Aug 23, 2019
Contributor
EriWong
left a comment
There was a problem hiding this comment.
Looks good. Thanks for fixing this!
EriWong
suggested changes
Aug 23, 2019
Contributor
EriWong
left a comment
There was a problem hiding this comment.
Looks like you have a conflict. I can accept this PR once you've resolved the merge. Thanks!
Contributor
Author
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #408
The main cause of this flicker is the long delay between the value changes of Checkbox::IsChecked and Checkbox::IsEnabled properties.
This is due to how the calculator generates the 64 different
AutomationProperties::Namevalues and how the app converts the number in enumerable. These 2 tasks were too CPU-intensive for no reason.Description of the changes:
BitFlipAutomationNameConverterconverter and replace it by a lighter and more optimized way to generate strings (note: this converter was called 64 times every time the number was changed or the bit length changed)BitLengthand use only one way to represent bit lengths inCopyPasteManager,StandardCalculatorViewModel(instead of 4 booleans + 1 enum)CalculatorProgrammerBitFlipPanelHow changes were validated:
Result