How to speed up Discourse Emoji

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.

  • 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.