Performance bar doesn't intercept vue-resource requests any more
If you load https://gitlab.com/gitlab-org/gitlab-ce/issues/57880, you'll see that discussions.json doesn't appear in the performance bar. This is requested with vue-resource, so it appears the interceptor there either isn't registered, or isn't registered in time.
It appears this was introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24190 but I don't see any comments there on why the performance bar initialisation needed to be moved later; in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20607 I already shuffled this about:
We need to eagerly load the performance bar wrapper component (
performance_bar/index.js) when the page is loaded and the container element is present, to ensure that we register the interceptor early enough in the page's lifecycle.However, we don't need to load the UI at that point. Not doing so means that we can let Webpack extract the UI (
performance_bar/components/*) into its own chunk, so users who don't see the performance bar don't have to load too much unnecessary JavaScript.
@timzallmann @iamphill can I move this back to be eager? I don't see any measurements in the initial MR so it's hard for me to say how much this should impact things but I don't expect it will have a big impact as this only sets up the interceptors at that point.