LocalData/localdata-api — pull request #209 by prashtx (2014-08-30 02:44:06+00:00)
Title: Use promises to support parallel db calls

Get the response count, response bounds, and survey data at the same time. If there is no such survey (404), we cancel the other two requests.

Super unscientific testing showed a ~30% savings for getting the survey data for a large data set (50k+ entries).

Bluebird promises also seem to perform well again async, and for some patterns they make things much simpler, so this will set us up to use them as needed later.
http://spion.github.io/posts/why-i-am-switching-to-promises.html

/cc @hampelm