How to speed up Discourse Emoji

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.

image

Thanks & Regards,
Gulshan

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?

1 Like

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.

1 Like

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:

What was happening is that Chrome likes “deferring” timers if they start taking too long.

  • We were batching “loading” up emojis
  • At some point chrome detected that our batches were taking more than 16ms
  • Chrome gets angry and says “no setTimer for you for 3 seconds or more”

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.

10 Likes