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

Autocomplete on /graph interface slow with large numbers of metricnames #3321

Closed
jacksontj opened this Issue Oct 20, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@jacksontj
Copy link
Contributor

jacksontj commented Oct 20, 2017

What did you do?
I have a cluster which returns ~150k names from /api/v1/label/__name__/values. This takes a decent amount of time for the browser to load, but then when you go to type it is slow to the point of unusable. For me at least (in both chrome and firefox) after I finish typing 2 characters it immediately pegs a CPU core for ~2m or so, rending the browser useless.

What did you expect to see?
I expect it to keep up :) A great example is from the grafana guys. They recently added ace editor support for promql (grafana/grafana#9118) and that javascript typeahead doesn't have problems with my 150k names

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 20, 2017

Dupe of #2119

@jacksontj

This comment has been minimized.

Copy link
Contributor Author

jacksontj commented Nov 5, 2017

This is actually not a duplicate, this is a separate issue.

The linked issue (#2119) is causing the browser to crash and requesting an addition of a limit to the API.

This issue is not showing as the browser crashing, but just that the javascript in the UI is slow. More interestingly (and as mentioned in the original issue description) the same number of metrics showing up in the response works fine performance-wise in grafana.

So, to re-iterate: this issue is client-side javascript slowness as the typeahead javascript library currently in use is horribly inefficient at handling large numbers of metrics (where there are many others-- including one example linked above) that handles it just fine.

@alkar

This comment has been minimized.

Copy link

alkar commented Nov 21, 2017

Experiencing the same, running v2.0.0.

@Stono

This comment has been minimized.

Copy link

Stono commented Jun 15, 2018

+1 to this, can we get it reopened?

@v1dlak

This comment has been minimized.

Copy link

v1dlak commented Dec 29, 2018

Do anybody have some workaround for this (for example some greasemonkey script) ? @jacksontj @Stono

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Dec 29, 2018

Indeed, this is not a dupe of #2119 at all (that was about expression query results), reopening.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Dec 30, 2018

The discussion on #2119 is about autocomplete.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Dec 30, 2018

It was about limiting expression query results originally, but then it seems further down people started misunderstanding it and adding their thoughts about the metrics list and autocomplete. That seems like a separate issue though, despite it being similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.