Hi,
I am sure, my Internet is not slow. It’s 5.3 Mbps. Still, I notice that Emoji loads very slow. It takes ages to load all icons. It would be great if we can preload it somehow.
Thanks & Regards,
Gulshan
In a support thread titled ‘How to speed up Discourse Emoji,’ Gulshan_Kumar reports slow emoji loading despite a decent 5.3 Mbps connection, noting it hampers usability during searches. itsbhanusharma suggests checking browser network logs and suspects server or CDN performance, noting the issue appears unique to Gulshan’s forum. Gulshan confirms no third-party services like Cloudflare are in use and expresses skepticism about CDN benefits, especially for returning users and dynamic content like GIFs, preferring core server optimization. After reloading, the issue temporarily resolved. Gulshan shares a video demonstrating the problem. sam identifies the root cause: Chrome throttles timers when batches exceed 16ms, delaying emoji loading for 3+ seconds. The fix, implemented via commit 911f898, replaces timers with requestAnimationFrame to avoid Chrome’s throttling, resolving the performance issue without requiring CDN or server changes.
As far as I know, all emojis are lazy loaded.
Have you checked your browser console’s network tab to see if it is discourse or your web server is the culprit?
I am not saying, it doesn’t load. It loads, but very slowly till you would already decide I don’t want to use emoji now. Because, searching for right emoji becomes difficult.
I will try to debug Console to see if there is any issue.
I’ve noticed that issue on your forum but never here on meta or on my own forum, looks like it’s very specific to you.
Maybe! I am not using Cloudflare or any third party even. I am more worried now when you already confirmed me.
That very much depends on available speed at your server and CDN. Have you tried configuring CDN on your forum yet?
I reloaded the forum web page, it fixed the problem instantly.
CDN would be helpful for delivering static content for new visitors only. For rest, it would be already cached.
I am skeptical about using CDN. I tried it, it was not huge difference.
I can try one more time to find out data result.
As a matter of Interactive session, for example if someone drop a new gif in message, I am afraid it can harm more, because the MISS response would be usually slower than the origin. Isn’t?
As per main audience location, I would prefer improving core server.
Can you please refer to this video, this is what exactly I am facing.
https://www.useloom.com/share/357e7637517346cdb6b7242e93606c04
I can see the issue this is actually not network related.
I fixed it per:
https://github.com/discourse/discourse/commit/911f898a2344d2689cc2913f37c836875f73cc7d
What was happening is that Chrome likes “deferring” timers if they start taking too long.
This is an internal issue in Chrome we need to report to them, but in the meantime I amended it so we use animation frames which are designed with this in mind.