Open l-dobrev opened 6 years ago
My investigation points, that the culprit is the building of the page-selection drop-down. Turns out the MaterialListValueBox by default reloads after adding every option, which ends up increasing the time taken exponentially.
Pull request with a fix incoming.
It will still be slow on the initial load. That's why in the next release it will be replaced with an input box - https://github.com/GwtMaterialDesign/gwt-material-table/pull/128
Well... The proposed fix makes loading with 1500 pages as fast as 10 pages.
Unless there is something I am missing the selector is recreated every time the page is changed, since the MaterialDataPager always calls updateUi() from onSuccess() in the LoadCallback, and updateUi() reinitialises the page selector drop-down.
When a table with a pager has a relatively large number of pages (say 1000) loading takes literally minutes in which time the user interface becomes unresponsive, and the browser (tab or process) pegs the CPU at 100%.