Speed up /history render #20

Open
opened 2017-11-15 21:32:12 -06:00 by mattbk · 10 comments
mattbk commented 2017-11-15 21:32:12 -06:00 (Migrated from github.com)

Depends on data frequency, obviously.

Depends on data frequency, obviously.
mattbk commented 2017-11-16 14:46:01 -06:00 (Migrated from github.com)

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

Not sure if this is a query thing or a network asset thing.
mattbk commented 2017-11-16 16:03:22 -06:00 (Migrated from github.com)

image

More likely JS.

![image](https://user-images.githubusercontent.com/3729038/32918322-a6af61c0-cae7-11e7-996e-0a1dc660b2f6.png) More likely JS.
mattbk commented 2017-11-16 16:05:23 -06:00 (Migrated from github.com)

image

![image](https://user-images.githubusercontent.com/3729038/32918407-f2d52e5e-cae7-11e7-930a-b5bbba9bfe8e.png)
mattbk commented 2017-11-16 16:12:09 -06:00 (Migrated from github.com)

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

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

plotly.js is 5.6 MB, no wonder it takes forever. Minified version is smaller: https://plot.ly/javascript/getting-started/#download
mattbk commented 2017-11-16 21:45:52 -06:00 (Migrated from github.com)

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

I think it's actually the page itself taking so long. 30 seconds for 24 hours of data?
mattbk commented 2017-11-16 22:06:44 -06:00 (Migrated from github.com)

JS is slow but is cached after first load.

JS is slow but is cached after first load.
mattbk commented 2017-11-16 22:33:44 -06:00 (Migrated from github.com)
  • Try sending the JSON but not rendering in Plotly. --> Does not increase speed.
  • Try calculating but not sending JSON.--> Does not increase speed.
- [x] Try sending the JSON but not rendering in Plotly. --> Does not increase speed. - [x] Try calculating but not sending JSON.--> Does not increase speed.
mattbk commented 2017-11-17 12:00:04 -06:00 (Migrated from github.com)

It's in the database/plot creation logic.

It's in the database/plot creation logic.
mattbk commented 2017-11-17 12:04:59 -06:00 (Migrated from github.com)

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

Cutting out the timezone conversion cuts load of the page itself from ~17s to ~4s.
mattbk commented 2017-11-17 12:32:00 -06:00 (Migrated from github.com)

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

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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: matt/pi-temp#20
No description provided.