Performance degradation on snippet view
In !57705 (merged) we have introduces Source Editor in the readonly
mode to the repository file view. Due to simple_viewer.vue
being used in more cases (snippets in particular), this change degraded performance for the use cases other than repository view right now. When the refactor_blob_viewer
feature flag will be enabled by default, most probably the performance degradation will also be registered for the repository file view (sitespeed does not work with feature flags so it keeps registering current scenario without Monaco).
There are a couple of immediate fixes we might introduce to prevent the performance degradation at least unless the flag is disabled:
- Make the repository viewer isolated (new component based off the
simple_viewer.vue
) and not shared with any other part of the application - Since the feature is behind the feature flag, we could account for that in the viewer and load the Source Editor async in case the flag is enabled
- Combine both approaches