You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 acontains()
operation is executed to calculated theselectionStateMap
and the checkbox state. This should be replaced with aMap
based operation.getSelectionIndices()
- inside a for-loop anindexOf()
operation is executed to calculated the selected indexes based on the items. This should be hcanged to aMap
based operation.Integer
usage should be replaced with primitive collection usage.FilterNatCombo.getTransformedText(String[])
Use a
StringJoiner
instead of+
operator for String concatenationComboBoxGlazedListsFilterStrategy.getStringFromColumnObject(int, Object)
Use a
StringJoiner
instead of+
operator for String concatenationFilterRowComboBoxCellEditor.setCanonicalValue(Object)
The calculation of
diffValues
is usingremoveAll()
to calculate the diff between currently visible and all available items. To improve the performance we should change the type ofdiffValues
fromList
toHashSet
as the order doesn't seem to be relevant.The text was updated successfully, but these errors were encountered: