Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Improve doc viewer table performance #104339

Closed
kertal opened this issue Jul 5, 2021 · 3 comments · Fixed by #120116
Closed

[Discover] Improve doc viewer table performance #104339

kertal opened this issue Jul 5, 2021 · 3 comments · Fixed by #120116
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application performance Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)

Comments

@kertal
Copy link
Member

kertal commented Jul 5, 2021

Follow up of #97649

When doc viewer table has to deal with lots of fields this leads to UI performance issues. Opening a doc in this view is no longer snappy. We initially intended to improve this by migrating to EuiInMemoryTable in #102149. But using the build in pagination leads to jumping UI issues when used in classic table (Because e.g. the page 2 can have a different height than page 1, and it's displayed inline in the doc table). It works better in the new table, which is using a flyout to display this view. So there are 2 ways to deal with this

1.) Wait for classic table to be deprecated, and use Pagination of EuiInMemoryTable
2.) Render e.g. 100 fields, display a "Show more fields" button at the end of the table, render more when the user clicks the button

@kertal kertal added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jul 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kertal kertal added the enhancement New value added to drive a business result label Jul 5, 2021
@timroes timroes added Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 31, 2021
@timroes
Copy link
Contributor

timroes commented Nov 29, 2021

Talked with @kertal offline about this. We believe we should try to add a couple of improvements to this to make the flyout better for documents with many fields:

  • Paginate the table, so we never show too many fields at the same time and block the browser by rendering a high amount of fields.
  • Add a search bar to the top, that allows quickly filtering down by field name (frontend side).
  • Potentially add a "Pin" button so you can temporarily (unsafed) pin specific fields, that will now always show at the top of the table while navigating through the documents. Ideally that temporary state is kept as long as the index pattern isn't changed (but kept when you close an reopen the flyout). Extra bonus points for storing the latest pinned fields per index pattern in localStorage, so we can reuse them even after switching index patterns back and forth.

The component is at the moment the same in Document Explorer and in the classical table. We only want those changes for the Document Explorer (due to the rendering in the flyout). Thus we should try to make a differentiation within that component using the discover:legacyTable uiSetting. If we feel that keeping both implementations together with that flag will be too troublesome we should consider cloning the implementation for now.

@kertal
Copy link
Member Author

kertal commented Nov 29, 2021

We only want those changes for the Document Explorer (due to the rendering in the flyout)

We might also have to consider that it should work
a) when rendered in the flyout
b) when rendered in the single doc view

For getting started, EUI doc page has some good examples (especially: In-memory table with search and external state):

https://elastic.github.io/eui/#/tabular-content/in-memory-tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application performance Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants