Commit 54b94673 authored by Jacob Schatz's avatar Jacob Schatz
Browse files

Merge branch 'discussion-reply-button-performance' into 'master'

Remove delay when hitting Reply... button on page with a lot of comments

Every time the "Reply..." button was hit, a new `GLForm` was instantiated (which is fine), which would then call `GitLab.GfmAutoComplete.setup()` without specifying which textarea we needed autocompletion on, which resulted in `GitLab.GfmAutoComplete.setup` iterating through every single textarea on the page. On a page with a lot of comments, where each comment would have its own textarea that will be used to edit the comment, this would take a long time and cause the whole page to hang for 2 seconds when a  "Reply..." button was clicked.

See merge request !5602
......@@ -19,6 +19,7 @@
- Clean up unused routes (Josef Strzibny)
- Add green outline to New Branch button. !5447 (winniehell)
- Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects
- Remove delay when hitting "Reply..." button on page with a lot of discussions
- Retrieve rendered HTML from cache in one request
- Fix renaming repository when name contains invalid chararacters under project settings
- Optimize checking if a user has read access to a list of issues !5370
......@@ -47,8 +47,8 @@
setup: function(wrap) {
this.input = $('.js-gfm-input');
setup: function(input) {
this.input = input || $('.js-gfm-input');
if (this.dataSource) {
......@@ -21,7 +21,7 @@
disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button'));
new DropzoneInput(this.form);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment