ydb-platform / ydb-embedded-ui

Apache License 2.0
28 stars 7 forks source link

Optimise query results #616

Open artemmufazalov opened 10 months ago

artemmufazalov commented 10 months ago

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:

  1. Switching from History or Saved tab to Query tab if there are some results
  2. Switching to results from stats and vice versa

What could be done:

  1. 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 and Fullscreen component
  2. 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

antonkovalenko commented 1 month ago

@Raubzeug please link this one to a ticket about migration

Raubzeug commented 1 month ago

@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.

antonkovalenko commented 1 month ago

@Raubzeug please add a screencast and a new issue about json inspector #1388