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

Optimize how the ME terminals are updated. #293

Merged
merged 1 commit into from Mar 27, 2023

Conversation

Dream-Master
Copy link
Member

Use a tree instead of clearing, refiltering, and resorting every time. Adds cached fields to determine whether the terminal needs to be completely resorted, such as when the sort order or sort direction is changed.

Implementation note - Java TreeSet implementation considers two elements to be equal if Comparator#compare(o1, o2) == 0. Thus, we need to be careful when implementing the comparators.

Use a tree instead of clearing, refiltering, and resorting every time. Adds
cached fields to determine whether the terminal needs to be completely
resorted, such as when the sort order or sort direction is changed.

Implementation note - Java TreeSet implementation considers two elements to
be equal if Comparator#compare(o1, o2) == 0. Thus, we need to be careful
when implementing the comparators.
@Dream-Master Dream-Master merged commit f3b8669 into dev Mar 27, 2023
1 check passed
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