bostonrb/bostonrb — Issue #144: Slow Rendering Times Caused By Font Loading
Author: derekprior
Created: 2012-01-11 19:56:00+00:00
State: open

I've occasionally noticed that the site is slow to load. The page structure loads, but none of the text does. Then anywhere from an imperceptible amount of time all the way to a second or two later, the text appears. When I tried to access the site last night, I waited for 20 seconds without the text ever rendering.

Judging from the Safari Web Inspector, the culprit seems to be the loading of the prociono.woff font. When running the inspector, the worst case performance I saw was the Load event firing at 2.8 seconds. That's not great and I know I've experienced worse when I wasn't timing it. The font file isn't sent with headers that make it cacheable so it's requested on every reload. Additionally, it seems the server that is hit for the download occasionally suffers from high latency.

I have to admit that I'm not really certain where this is being loaded in, though I've only looked for a minute or two. I assume its from JavaScript. Can the font be set to be served with cache headers? Can the page render with readable text before the font finishes downloading? Or perhaps the external font simply isn't worth it?