8

Many sites on Stack Exchange network are showing a nice banner for newsletter in their sidebar, with a link to example newsletter, e.g.

However, this results in blank dialog window that showing just white for over 10 seconds. Most users will just close it by then.

Quick look in Network tab of Chrome dev tools showing the cause:

That's not normal. ALL other things on Stack Exchange works fast. Can the example newsletter please be cached somehow and load faster?

If the speed can't be improved, the link should really be removed, it's not good and only irritate those who click it.

It's also not specific to one site, e.g. I also checked Arqade Newsletter and it takes the same looong time to load.

  • 1
    At least it loads from side bar after 10 or more seconds, but not from the Edit profile & Settings tab – Arulkumar Jun 5 '17 at 14:43
  • @Arulkumar heh, that's true, but only few will wait so much time for this to load. – Shadow Wizard Jun 5 '17 at 14:45
  • Just over 10 seconds, regardless of the site size? That's got a smell... – Guest Aug 4 '17 at 2:40
8
+50

That it was always taking just over ten seconds, regardless of site, was quite suspicious. 🤔

It will now load in a more reasonable amount of time. 🙂

The newsletter generation code fires off several internal API requests to get the necessary data, waits until it has all of the responses, and then renders the HTML. The API responses are cached, as you'd expect. However in May, as part of the Blog Overflow shutdown, this code was updated to remove the API request fetching recent blog posts, but the count of expected API responses was not updated to match. The code could no longer detect that it had received all of the responses, so the render would be delayed until it gave up after a ten second timeout.

The fix was simple:

-                const int numExpectedResponses = 5;
+                const int numExpectedResponses = 4;
  • 2
    Huh. Well, 50 points well spent. Thanks! – Shadow Wizard Aug 4 '17 at 4:28
  • 1
    @ShadowWizard Thanks for the report: I finally get the (bronze) status-completed badge. – Guest Aug 4 '17 at 16:07
  • Hey, I have a feeling this old bug might also have a trivial fix like the one here... if you can take a look It would be really awesome. – Shadow Wizard Aug 5 '17 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .