There are heavy, synchronous loops in the code that block the rendering thread.
Here’s a live example: survey-page-results.html (watch the http vs. https URLs, Chrome tries to SSL you but it needs to be http).
Needs
Several data-processing functions in the library take a few seconds to work, and need to be broken up over time so the display can manage user expectations.
[x] Break up correlate_geographies() to use window.setTimeout().
[x] Break up load_city_tracts() to load by table instead of by geography. This will better match underlying Census Reporter table performance according to @iandees.
There are heavy, synchronous loops in the code that block the rendering thread.
Here’s a live example: survey-page-results.html (watch the
http
vs.https
URLs, Chrome tries to SSL you but it needs to behttp
).Needs
Several data-processing functions in the library take a few seconds to work, and need to be broken up over time so the display can manage user expectations.
correlate_geographies()
to usewindow.setTimeout()
.load_city_tracts()
to load by table instead of by geography. This will better match underlying Census Reporter table performance according to @iandees.Code
Relevant files and functions:
correlate_geographies()
in lib.jsload_city_tracts()
in lib.js