Skip to content
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 sort Alias TableView while bulk changes are applied #1039

Merged

Conversation

NoahWL
Copy link
Contributor

@NoahWL NoahWL commented Feb 10, 2021

When the user has selected a column to sort by on the TableView in the Alias editor, the table's backing SortedList will resort every time an ObservableProperty of an Alias is modified. This can cause the UI to lock up for minutes at a time if many Aliases are modified at once using the AliasBulkEditor.

This change works around this issue by simply resetting the SortedList's ComparatorProperty while the AliasBulkEditor is applying changes, and rebinding it back to the TableView's ComparatorProperty once AliasBulkEditor has finished.

This change seems a bit hacky to me but it's the cleanest thing I could come up with. I couldn't find a way to set a property's value to null via a binding, so unbinding and rebinding had to do. I hope that I'm missing a simple solution to this problem because this isn't the only instance of UI updates slowing stuff down when many changes are being made at once, and manually pausing slow elements while changes are made is annoying and a maintenance nightmare. Regardless, in the meantime this change makes the Alias editor a lot more usable and it is easily reversible should a better solution be proposed later.

NoahWL added 2 commits February 9, 2021 13:27
SortedList takes too long to sort and can cause large slowdowns and UI
freezes while many changes to Aliases are applied at once via the
AliasBulkEditor.
@DSheirer DSheirer merged commit 87e9bf8 into DSheirer:master Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants