Users are experiencing slowness in loading avatars on meta.discourse.org. According to DeanMarkTaylor, a test using http://www.webpagetest.org/ revealed that redirects from one CDN to another for avatars add ~7 seconds to the load time. This is due to a known issue with S3 as an image host, causing a “yucky redirect” sam.
Sam noted that fixing this issue is complicated, but a possible solution is to use an avatar template on S3 instead of different assets and GUIDs for each resized avatar.
However, codinghorror questioned why avatar redirects would block page load, and sam clarified that they don’t, but rather affect WebPageTest results. According to sam, WebPageTest considers a page loading until N percent of the page is displayed, which is affected by the redirects.
Sam later announced that the issue has been fixed with a commit to the Discourse repository.
A side note - it would be nice if the initial render could take place without any avatars…
… and then later load them, getting that initial render quicker would be nice.
Obviously this might look very different when there are no 302 redirects
This only happens when you store resources in S3 from what I understand. I do get initial render before avatars load, I know when we were in Australia on wifi I saw lots of slow network effects.
Why would image load block initial render? I certainly do not see that. The page has no knowledge of images until the JavaScript draws the html on the page…
Yeah, it is a known issue with S3 as an image host, we have a very yucky redirect.
We want to fix it but it is very complicated. If we can somehow get an avatar template going on s3 instead of different assets and guids for each resized avatar we may be able to correct it.