[Logs + Metrics UI] Clean up async plugin bootstrapping #62413
Labels
chore
Feature:Logs UI
Logs UI feature
Feature:Metrics UI
Metrics UI feature
loe:medium
Medium Level of Effort
performance
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Milestone
Summary
In order to decrease the synchronously loaded script bundle size and thereby decrease the perceived loading time of Kibana, #62363 moves more of the plugin code behind asynchronous import. The complexity of the "infra" plugin bootstrap procedure prevented a more straightforward split with an async bundle for each of the sub-apps (i.e. Logs and Metrics) at the time.
To fully benefit from the lazy loading the unnecessarly shared
compose_libs
andstart_app
layers could be removed in favor of separate straightforward entry points for each of the apps.Details
This would also be an opportunity to remove React context providers that have been superseded by the common new-platform provider and up-to-date router implementation.
Besides improved maintainability a reasonable benchmark for improvements would be the plugin-related bundle size that is eagerly loaded by Kibana compared to the lazily loaded bundle size. With the current new-platform build system each plugin is a self-contained set of JS files, one of which is always loaded with Kibana:
plugins/${pluginName}/target/public/${pluginName}.plugin.js
. The lazily loaded parts live in several${N}.plugin.js
files within that same directory:Ideally we would refactor the
mount
function in the Logs and Metrics app'score.application.register
invocation such thatinfra.plugin.js
is as small as possibleThe text was updated successfully, but these errors were encountered: