Lately I’ve noticed that if I edit a post and save, the thread won’t immediately show the changes as it used to. Instead, I have to reload the entire thread to get the changes to show. Is that desired behavior or something that a settings tweak could fix?
Hmm, I’ll have to see if I can reproduce this so I understand what’s going on. I think I may have noticed the same thing, but I also think I’ve seen it update on its own if I just wait a few seconds longer.
With some experimentation, it seems that the update takes place 10–15 seconds afterward reliably. I don’t see a setting related to that, but see if that matches your experience.
Exploring the settings did alert me to the fact that I can change the controls under a post, so I exposed edit (the pencil icon) and delete (the trash can) so they are no longer hidden under the ••• button.
Thanks, Adam. 10-15 sec seems like quite a long time. I wonder if that was increased in a more recent version. I don’t think it’s always taken that long.
I’ve asked over on the Discourse forum—the updates there are instant.
Thanks, Adam. Interesting that posts appear to refresh instantly there. That’s also how I remember this site used to work. Looking forward to hear what the experts there say.
Sounds like it’s a performance issue, so hopefully @elivz can take a look at our installation soon and see where it’s having trouble.
Update: we’ve looked now, and nothing seems amiss. But the problem still exists. Trying different things at Cloudflare now.
I still wonder if it could be related to one of the updates you performed a while back. It seemed the issue only popped up after that. The site used to refresh instantaneously.
Jut tried it again. This time it took a full 22 sec to refresh. On second attempt it took 6 sec.
Try again now. I just turned off some compression features at Cloudflare that might have been related. My last test was nearly instant.
I was actually just editing another post and when saving noticed it has refreshed instantly. I wondered if you might have just tweaked something. Came over here and sure enough. Thanks, Adam. Really appreciate your digging around!
Now I need to figure out if both the features I turned off were necessary, or if I can turn one of them back on. After all, both were on before when we weren’t having problems.
Do please let us know what the settings are. I’m sure I’m not the only person on this list also running Discourse forums! Thanks!
Indeed, when I just tried it again it took 20 seconds to refresh.
I think Brotli compression is the culprit. I’ve toggled that back off and it’s slow again. The world is a complicated place.
Inspecting this very page now, it says it’s not compressed. Are you talking about a compression setting within Discourse or within your Cloudflare account (the CDN)? Since the page is delivered to our browsers by Cloudflare, if it can compress resources not already compressed by the actual server, that would provide most of the benefits (it wouldn’t help your server’s outbound bandwidth bill, if that’s something to worry about).
Delays like this are caused by caching at various levels. Caching web content, at the server or CDN level, for logged-in users provides little benefit because each page is unique to each user. Discourse could cache database query results (e.g. each comment made in this thread) to reduce the database load.
Yes, the Brotli compression setting is at Cloudflare.