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

JSON Unmarshaling of large responses is excessively expensive #565

Closed
jacksontj opened this issue May 2, 2019 · 1 comment · Fixed by #570
Closed

JSON Unmarshaling of large responses is excessively expensive #565

jacksontj opened this issue May 2, 2019 · 1 comment · Fixed by #570
Assignees

Comments

@jacksontj
Copy link
Contributor

This is basically the same issue as prometheus/prometheus#3601 and prometheus/prometheus#3536

The current api client here uses the base encoding/json which is both slow and memory inefficient. For large responses it can generate garbage >10x the size of the response data. So, ideally we'd use a better (read: faster) json library. Upstream prom uses json-iter -- so presumably we'd do the same here?

Thoughts @krasi-georgiev

@krasi-georgiev
Copy link
Contributor

Yep that sound good. PR is welcome.

jacksontj added a commit to jacksontj/client_golang that referenced this issue May 8, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 8, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 16, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 20, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 22, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 22, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 22, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 23, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 23, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 25, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 25, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
jacksontj added a commit to jacksontj/client_golang that referenced this issue May 25, 2019
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes prometheus#565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants