Today's teensy tiny #MastodonPerf improvement: making emoji replacement faster. This speeds up column switching by about ~50ms on a Nexus 5X: https://github.com/tootsuite/mastodon/pull/4019

TL;DR: regexes can be slow, especially when your regex contains every emoji shortcode ever (`ːsmileː`, `ːwinkː`, `ːman_cartwheeling_tone5ː`, etc.). Replacing it with a simple for-loop over the length of the string can be a big speedup!

In case you're scratching your head wondering why _those_ shortcodes aren't getting replaced, it's because I used the sneaky IPA triangular colon character: http://www.fileformat.info/info/unicode/char/02d0/index.htm
@nolan Speaking of emojis, what if we can avoid loading emojioneList? Was thinking of configuring the backend to redirect stuff like /web/emoji/smile to the corresponding svg from /public/emojis? That would leave us with 3 variables from EmojiOne, which we could inline and drop the dependency.

@sorin Yeah I still want to migrate emojione to ES modules. It can be done, we just need to maintain backwards compat: https://github.com/emojione/emojione/pull/489 If we got this working, then with Webpack tree-shaking we would automatically drop our unused variables.

As for /web/emoji redirect that sounds interesting; I haven't looked into that yet. Mostly though I wish we were using spritesheets or something; it's kinda nuts that we load one file per emoji when opening the emoji picker.