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

TSVB field list performance issue on using annotations #83405

Closed
flash1293 opened this issue Nov 16, 2020 · 2 comments · Fixed by #84407
Closed

TSVB field list performance issue on using annotations #83405

flash1293 opened this issue Nov 16, 2020 · 2 comments · Fixed by #84407
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

Kibana version: 7.10

Describe the bug: When adding an annotation datasource to TSVB, the index input is filled with * by default.
This causes two requests to /api/metrics/fields?index=* which will fetch fields of all indices accessible by the current user and send them to the client. Depending on the amount and variety of indices this can be a relatively costly operation, choking the responsiveness of the Kibana server and client.

This is further amplified by additional requests on each keystroke while typing in the input field

Steps to reproduce:

  1. Go to TSVB
  2. Switch to Annotation tab and add datasource
  3. Request is sent twice for * index pattern
  4. Start typing
  5. Request is sent for each keystroke

Expected behavior:

I can think of two different ways to improve this:

  • Set the input to empty string by default and don't send a request for fields at all (require the user to enter an indexpattern first) - the "*" default is not a good default anyway because it's very rarely the right choice
  • Debounce responsiveness of the input - don't fetch fields on each keystrokes, only after the user stopped typing for 0.5s or something similar
@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 16, 2020
@elasticmachine
Copy link
Contributor

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

@alexwizp
Copy link
Contributor

@flash1293 I agree with you, I think we should implement both of your suggestions. We already use debounce for the data request, and I have no idea why it's not working for fields.... it should be checked. Replacing * to the default index looks like a good performance improvement for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants