impactlab / oeem-client

:bangbang: MOVED TO https://github.com/openeemeter/frontend-datastore-client-old - Client Application of the OEEM Energy Datastore providing a front-end/dashboard experience.
0 stars 0 forks source link

Fix long lag in rendering plots for main portfolio view #16

Open matthewgee opened 8 years ago

matthewgee commented 8 years ago

Main dashboard plots take incredibly long (20+ seconds) to render when switching between tabs.

philngo commented 8 years ago

Maybe we should start with a loading spinner (easier) or loading bar (harder)?

hunterowens commented 8 years ago

maybe

philngo commented 8 years ago

Yay react! But still, to use a progress bar, we would have to either A) spoof the load percentage (have it move more slowly at first then magically jump to the end or disappear when it actually loads) or B) figure out some way to actually measure loading progress. (Strong preference for A.)

philngo commented 8 years ago

But the real problem still needs to be addressed. I imagine that the way to fix that will be to front-load or otherwise optimize the ajax calls that the react components are making to load in the data, mostly by making the components more purely reactive. It will probably be easier to fix the speed of chart switching (addressed in this issue) than it will be to fix the initial chart data loading (not addressed in this issue).

philngo commented 8 years ago

Adding some timing for bottleneck ajax calls (for 400 meter runs/200 projects): Gross Savings Timeseries: 16300ms Annual Savings Histogram: 4200ms Realization Rate Scatterplot: 5000ms Map: 500ms

derekeder commented 8 years ago

Have you considered caching the data/API layer? Sounds like there could also be some database optimizations to make.

philngo commented 8 years ago

See #24 for loading spinner issue