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
Setting the page size of a Grid to a very large value can lead to browser side hangs even if the data provider does not contain many items.
Expected outcome
I would expect the performance of the Grid to be proportional to the actual number of items in the data provider rather than the potential number of items in a page.
This will cause an empty Array to be created of size pageSize which then needs to be iterated over. If pageSize is some huge value this will cause the browser event loop to hang for a while.
Environment
Vaadin version(s): 24.4.11
OS: macOS
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered:
pepijnve
added a commit
to datadobi/flow-components
that referenced
this issue
Sep 17, 2024
Description
Setting the page size of a Grid to a very large value can lead to browser side hangs even if the data provider does not contain many items.
Expected outcome
I would expect the performance of the Grid to be proportional to the actual number of items in the data provider rather than the potential number of items in a page.
Minimal reproducible example
Steps to reproduce
Add the above snippet to a view
I'm not sure what the requirement is to trigger the code path, but you want to reach line https://github.com/vaadin/flow-components/blob/main/vaadin-grid-flow-parent/vaadin-grid-flow/src/main/resources/META-INF/resources/frontend/gridConnector.ts#L513 with items being undefined.
This will cause an empty Array to be created of size
pageSize
which then needs to be iterated over. IfpageSize
is some huge value this will cause the browser event loop to hang for a while.Environment
Vaadin version(s): 24.4.11
OS: macOS
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered: