edgecase/bird-wave

Load all year's records up-front

Closed this issue · 3 comments

@DerekBriggs suggested that we could load all year's sightings up front when the bird is selected, so that it's in memory when the user picks the months.

I think our current schema allows for this, since we can return all the records grouped by the month-yr, so that finding the data for the month is just looking it up by month-yr in the returned JSON object. I can take a crack at it.

This would make the user interaction much quicker when selecting the months for that bird. One large load on the initial choice rather than a bunch of intermediate loads while the user is actually interacting with the data.

Derek

On Feb 17, 2014, at 8:47 PM, Chandu Tennety notifications@github.com wrote:

@DerekBriggs suggested that we could load all year's sightings up front when the bird is selected, so that it's in memory when the user picks the months.

I think our current schema allows for this, since we can return all the records grouped by the month-yr, so that finding the data for the month is just looking it up by month-yr in the returned JSON object. I can take a crack at it.


Reply to this email directly or view it on GitHub.

jxa commented

The way the data is currently queried it would be unacceptably slow to load all records up front. #7 improves query performance quite a bit, about 3 seconds for a full year of bald eagles. In addition to loading the full year. There are 2 things that I can think of to give a faster initial load as well as improved responsiveness.

  1. cache the query results as they are generated. This means responsiveness will improve over time as people use the app.
  2. start fetching the next month's data as soon as the first set is received.
  3. other ideas?

PR #9 fixes this concern, and the app is much quicker to react. Closing.