jmmastey / chicagoapprenticeships

A site to list software apprenticeships in Chicago with details on what they provide (e.g. bennies?)
1 stars 2 forks source link

stop parsing `apprenticeships.json` on every page load #3

Open jmmastey opened 7 years ago

jmmastey commented 7 years ago

I don't remember how to memoize data in Sinatra between requests, but right now we're reading from the filesystem every single time the page is loaded. That's... stupid. We'd get some performance increases by just memoizing this value.

jmmastey commented 7 years ago

Alternatively, the answer to this might be to just do a better job of caching the page. The entire contents of the site are static, so a page-caching solution would work well here, and would also allow us to keep reloading the file every time in development.