Optimise query results
Currently on very big datasets in results or with big request stats some use cases are very slow and could take up to 2-3 seconds 😱. Big stats are quite a common thing for requests with multi schema.
Use cases:
- Switching from History or Saved tab to Query tab if there are some results
- Switching to results from stats and vice versa
What could be done:
- Keep rendered elements on screen (for example with
display: none), so they won't be calculated again. Applicable to result tables, stats, ast, explain plan andFullscreencomponent - Optimise data calculations and rendering
Migrating QueryEditor files to TS is essential for this issue: https://github.com/ydb-platform/ydb-embedded-ui/issues/619
Inspired by: https://github.com/ydb-platform/ydb-embedded-ui/pull/595#discussion_r1403494080
@Raubzeug please link this one to a ticket about migration
@antonkovalenko I've double checked the situation, and it still needs some improvements. Huge tables are re-rendering every time we return to the tab with results (or switch to Fullscreen). Let's evaluate this issue as is.
@Raubzeug please add a screencast and a new issue about json inspector #1388
Query result table optimization
With dynamicRenderType: 'variable' and dynamicItemSizeGetter table renders all its cells, it causes performance issues on big tables.
Rendering of a query result table with 100 000 rows.
With dynamicRenderType: 'variable' and dynamicItemSizeGetter:
With 'uniform' rendering:
I'm not sure what is exactly the key reason here, it may be dynamicItemSizeGetter which makes react-list check hasDeterminateSize to be true (https://github.com/caseywebdev/react-list/blob/master/react-list.es6#L246) or it may be 'variable' render type itself
For tables, where 'uniform' rendering is not possible, result limiting is required: https://github.com/ydb-platform/ydb-embedded-ui/issues/1700