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

Speed up /history render #20

Open
mattbk opened this issue Nov 16, 2017 · 10 comments
Open

Speed up /history render #20

mattbk opened this issue Nov 16, 2017 · 10 comments

Comments

@mattbk
Copy link
Owner

mattbk commented Nov 16, 2017

Depends on data frequency, obviously.

@mattbk
Copy link
Owner Author

mattbk commented Nov 16, 2017

Not sure if this is a query thing or a network asset thing.

@mattbk
Copy link
Owner Author

mattbk commented Nov 16, 2017

image

More likely JS.

@mattbk
Copy link
Owner Author

mattbk commented Nov 16, 2017

image

@mattbk
Copy link
Owner Author

mattbk commented Nov 16, 2017

plotly.js is 5.6 MB, no wonder it takes forever.

Minified version is smaller: https://plot.ly/javascript/getting-started/#download

@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

I think it's actually the page itself taking so long. 30 seconds for 24 hours of data?

@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

JS is slow but is cached after first load.

@mattbk mattbk changed the title Speed up queries of long ranges? Speed up /history render Nov 17, 2017
@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

  • Try sending the JSON but not rendering in Plotly. --> Does not increase speed.
  • Try calculating but not sending JSON.--> Does not increase speed.

@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

It's in the database/plot creation logic.

@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

Cutting out the timezone conversion cuts load of the page itself from ~17s to ~4s.

@mattbk
Copy link
Owner Author

mattbk commented Nov 17, 2017

This is what is being used right now: http://arrow.readthedocs.io/en/latest/

I wonder if the for() loop itself is the issue. https://medium.com/python-pandemonium/never-write-for-loops-again-91a5a4c84baf

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

No branches or pull requests

1 participant