Skip to content
代码片段 群组 项目
  • Yorick Peterse's avatar
    5830d80b
    Pre-calculate Emoji digests · 5830d80b
    Yorick Peterse 创作于
    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
    5830d80b
    历史
    Pre-calculate Emoji digests
    Yorick Peterse 创作于
    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
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。