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

[Performance] Excel-like filter for huge data sets #118

Closed
fipro78 opened this issue Sep 27, 2024 · 0 comments
Closed

[Performance] Excel-like filter for huge data sets #118

fipro78 opened this issue Sep 27, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fipro78
Copy link
Contributor

fipro78 commented Sep 27, 2024

There are several places in the code that is used for the Excel-like filter dropdowns, that contain possible performance flaws for huge datasets.

  • NatCombo
    • setDropdownSelection(String[]) - inside a for-loop a contains() operation is executed to calculated the selectionStateMap and the checkbox state. This should be replaced with a Map based operation.
    • getSelectionIndices() - inside a for-loop an indexOf() operation is executed to calculated the selected indexes based on the items. This should be hcanged to a Map based operation.
    • The Integer usage should be replaced with primitive collection usage.
  • FilterNatCombo.getTransformedText(String[])
    Use a StringJoiner instead of + operator for String concatenation
  • ComboBoxGlazedListsFilterStrategy.getStringFromColumnObject(int, Object)
    Use a StringJoiner instead of + operator for String concatenation
  • FilterRowComboBoxCellEditor.setCanonicalValue(Object)
    The calculation of diffValues is using removeAll() to calculate the diff between currently visible and all available items. To improve the performance we should change the type of diffValues from List to HashSet as the order doesn't seem to be relevant.
fipro78 added a commit that referenced this issue Sep 27, 2024
Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
fipro78 added a commit that referenced this issue Sep 30, 2024
Switched from IntList to IntSet in NatCombo#select(int[])

Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
@fipro78 fipro78 reopened this Oct 1, 2024
fipro78 added a commit that referenced this issue Oct 1, 2024
Additional optimizations related to collection checks

Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
fipro78 added a commit that referenced this issue Oct 1, 2024
Additional optimizations related to collection checks

Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
@fipro78 fipro78 closed this as completed in 563e0c2 Oct 1, 2024
@fipro78 fipro78 self-assigned this Oct 8, 2024
@fipro78 fipro78 added the enhancement New feature or request label Oct 8, 2024
@fipro78 fipro78 added this to the 2.5.0 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant