Commit graph

6 commits

Author SHA1 Message Date
Connor Shea
f31f78cea3
Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem.
No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier.

Also fix the Rake task and update gemojione to 2.6.1. This adds the EmojiOne Spring update.

Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md
2016-06-29 14:53:09 -06:00
Arinde Eniola
1d1ca8b9c2 fix emoji aliases not showing in autocomplete 2016-04-09 13:29:37 +01:00
Yorick Peterse
5830d80b8d Pre-calculate Emoji digests
By pre-calculating the digests we can manually construct the emoji URLs,
removing the need for using Rails' asset URL helpers. The reason we
don't want to use these helpers for Emojis is two-fold:

1. Rails' image_url() method is slow, really slow. For one it _might_
   have to calculate digests but it also performs a lot of other
   intensive operations (judging by the source code and based on
   measuring timings).

2. We have a lot of Emoji which coupled with the above can result in it
   taking minutes to load Emoji autocomplete data.

Using this pre-calculation setup generating the digests takes around 7
seconds (including the time it takes to start Rails/Rake), and only
around 600 milliseconds to load _all_ the autocomplete data of a project
(measured locally).

This commit _does_ change the Emoji URLs from absolute to relative URLs
as these are much easier to generate.

To update the Emoji data simply run:

    rake gemojione:digests

Then commit any changes.

Fixes gitlab-org/gitlab-ce#14009
2016-03-30 19:29:17 +02:00
Robert Speicher
bbdf05993b Update fixtures/emojis/aliases.json
Also adds a script to re-generate them from the index.
2016-02-15 23:41:44 -05:00
Robert Speicher
262286936a Update fixtures/emojis/index.json
Current as of Gemojione 2.2.1 - https://git.io/vgQx0
2016-02-15 23:41:42 -05:00
Valery Sizov
b6de0d2830 Emoji picker: better alias handling 2015-12-24 11:28:55 +02:00