SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
443 stars 99 forks source link

[AnalyticalTable]: Abnormally long reaction times for selection when table has large data #4886

Open davidmobbssap opened 1 year ago

davidmobbssap commented 1 year ago

Describe the bug

Our component relies on the AnalyticalTable to display datasets, sometimes large ones. In this case we have a big tree, and the user wishes to select (check in a multi-select table) a node. It takes more than 20 seconds for the click to be processed, this is way too long.

Isolated Example

https://codesandbox.io/p/sandbox/snowy-shape-hw4d99?file=%2Fsrc%2FApp.tsx%3A31%2C16

Reproduction steps

  1. Open the attached sandbox
  2. Expand node "A node with many children"
  3. Click on a check box for one of the "CHILD#" nodes 4.Wait... You may even get a browser message about the page being unresponsive. 5.After a while the node "A node with many children" finally gets the indeterminate state in its checkbox. ...

Expected Behaviour

The action should be instantaneous. Our investigation seems to exhibit an algorithm in the useIndeterminateRowSelection plugin performing full tree scans upon selections, maybe this can be improved.

Screenshots or Videos

No response

UI5 Web Components for React Version

1.16.0

UI5 Web Components Version

1.14.0

Browser

Chrome, Edge

Operating System

MacOS, Windows

Additional Context

No response

Relevant log output

No response

Declaration

Lukas742 commented 1 year ago

Hi @davidmobbssap

unfortunately this is an issue that we can't investigate in the near future. Perhaps there's a better way to solve this, but that would likely result in a major refactoring of the component (I'd love to be proven wrong though) and we currently don't have the capacity to tackle this. Sorry for the inconvenience!

I will mark this issue with contribution welcome and help wanted, so if you want to take a look at it, please feel free to do so. Also, I will add a note to the hook pointing out the performance issues with large datasets.