summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/blob/components/blob_edit_content.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/assets/javascripts/blob/components/blob_edit_content.vue
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/blob/components/blob_edit_content.vue')
-rw-r--r--app/assets/javascripts/blob/components/blob_edit_content.vue17
1 files changed, 4 insertions, 13 deletions
diff --git a/app/assets/javascripts/blob/components/blob_edit_content.vue b/app/assets/javascripts/blob/components/blob_edit_content.vue
index 6293f3bed1c..a013d637c1d 100644
--- a/app/assets/javascripts/blob/components/blob_edit_content.vue
+++ b/app/assets/javascripts/blob/components/blob_edit_content.vue
@@ -1,12 +1,9 @@
<script>
import { debounce } from 'lodash';
import { initEditorLite } from '~/blob/utils';
-import {
- SNIPPET_MARK_BLOBS_CONTENT,
- SNIPPET_MARK_EDIT_APP_START,
- SNIPPET_MEASURE_BLOBS_CONTENT,
- SNIPPET_MEASURE_BLOBS_CONTENT_WITHIN_APP,
-} from '~/performance_constants';
+import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance_constants';
+
+import eventHub from './eventhub';
export default {
props: {
@@ -48,13 +45,7 @@ export default {
this.editor.onDidChangeModelContent(debounce(this.onFileChange.bind(this), 250));
- window.requestAnimationFrame(() => {
- if (!performance.getEntriesByName(SNIPPET_MARK_BLOBS_CONTENT).length) {
- performance.mark(SNIPPET_MARK_BLOBS_CONTENT);
- performance.measure(SNIPPET_MEASURE_BLOBS_CONTENT);
- performance.measure(SNIPPET_MEASURE_BLOBS_CONTENT_WITHIN_APP, SNIPPET_MARK_EDIT_APP_START);
- }
- });
+ eventHub.$emit(SNIPPET_MEASURE_BLOBS_CONTENT);
},
beforeDestroy() {
this.editor.dispose();