diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index a800cc8edc8131edeebcff1c82e1ff17875fe98f..9d8d184a3f614b86e23ff61b6a6327c7c4590aaa 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -20,6 +20,8 @@ import HiddenFilesWarning from './hidden_files_warning.vue'; import MergeConflictWarning from './merge_conflict_warning.vue'; import CollapsedFilesWarning from './collapsed_files_warning.vue'; +import { diffsApp } from '../utils/performance'; + import { TREE_LIST_WIDTH_STORAGE_KEY, INITIAL_TREE_WIDTH, @@ -272,8 +274,12 @@ export default { ); } }, + beforeCreate() { + diffsApp.instrument(); + }, created() { this.adjustView(); + eventHub.$once('fetchDiffData', this.fetchData); eventHub.$on('refetchDiffData', this.refetchDiffData); this.CENTERED_LIMITED_CONTAINER_CLASSES = CENTERED_LIMITED_CONTAINER_CLASSES; @@ -294,6 +300,8 @@ export default { ); }, beforeDestroy() { + diffsApp.deinstrument(); + eventHub.$off('fetchDiffData', this.fetchData); eventHub.$off('refetchDiffData', this.refetchDiffData); this.removeEventListeners(); @@ -487,9 +495,11 @@ export default {