Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The login page should load only the plugins that are absolutely necessary and only when needed #213133

Open
azasypkin opened this issue Mar 4, 2025 · 1 comment
Labels
chore Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed

Comments

@azasypkin
Copy link
Member

azasypkin commented Mar 4, 2025

Summary

We've recently learned that the login page loads bundles from quite a few plugins, many of which don't seem relevant at all (e.g., spaces, screenshotMode). We should investigate why this is happening and see if we can avoid loading some of them or at least load them lazily.

Should the login page be a separate lightweight plugin?

{
  "url": "http://localhost:5620/login",
  "bundleCount": 25,
  "totalSize": 5309189,
  "pluginCount": 18,
  "plugins": [
    {
      "name": "banners",
      "bundlesCount": 1,
      "totalSize": 12998,
      "bundles": [
        {
          "name": "banners.plugin.js",
          "transferredSize": 12998
        }
      ]
    },
    {
      "name": "cloud",
      "bundlesCount": 1,
      "totalSize": 7391,
      "bundles": [
        {
          "name": "cloud.plugin.js",
          "transferredSize": 7391
        }
      ]
    },
    {
      "name": "core",
      "bundlesCount": 1,
      "totalSize": 343183,
      "bundles": [
        {
          "name": "core.entry.js",
          "transferredSize": 343183
        }
      ]
    },
    {
      "name": "dataViews",
      "bundlesCount": 1,
      "totalSize": 43184,
      "bundles": [
        {
          "name": "dataViews.plugin.js",
          "transferredSize": 43184
        }
      ]
    },
    {
      "name": "esUiShared",
      "bundlesCount": 1,
      "totalSize": 110010,
      "bundles": [
        {
          "name": "esUiShared.plugin.js",
          "transferredSize": 110010
        }
      ]
    },
    {
      "name": "features",
      "bundlesCount": 1,
      "totalSize": 4685,
      "bundles": [
        {
          "name": "features.plugin.js",
          "transferredSize": 4685
        }
      ]
    },
    {
      "name": "kbn-ui-shared-deps-npm",
      "bundlesCount": 5,
      "totalSize": 2843270,
      "bundles": [
        {
          "name": "kbn-ui-shared-deps-npm.chunk.29169.js",
          "transferredSize": 2460
        },
        {
          "name": "kbn-ui-shared-deps-npm.chunk.4191.js",
          "transferredSize": 2325
        },
        {
          "name": "kbn-ui-shared-deps-npm.chunk.89271.js",
          "transferredSize": 3115
        },
        {
          "name": "kbn-ui-shared-deps-npm.chunk.9282.js",
          "transferredSize": 2231
        },
        {
          "name": "kbn-ui-shared-deps-npm.dll.js",
          "transferredSize": 2833139
        }
      ]
    },
    {
      "name": "kbn-ui-shared-deps-src",
      "bundlesCount": 1,
      "totalSize": 1617578,
      "bundles": [
        {
          "name": "kbn-ui-shared-deps-src.js",
          "transferredSize": 1617578
        }
      ]
    },
    {
      "name": "kibanaReact",
      "bundlesCount": 1,
      "totalSize": 44823,
      "bundles": [
        {
          "name": "kibanaReact.plugin.js",
          "transferredSize": 44823
        }
      ]
    },
    {
      "name": "kibanaUtils",
      "bundlesCount": 1,
      "totalSize": 68410,
      "bundles": [
        {
          "name": "kibanaUtils.plugin.js",
          "transferredSize": 68410
        }
      ]
    },
    {
      "name": "licensing",
      "bundlesCount": 1,
      "totalSize": 9874,
      "bundles": [
        {
          "name": "licensing.plugin.js",
          "transferredSize": 9874
        }
      ]
    },
    {
      "name": "mockIdpPlugin",
      "bundlesCount": 1,
      "totalSize": 10450,
      "bundles": [
        {
          "name": "mockIdpPlugin.plugin.js",
          "transferredSize": 10450
        }
      ]
    },
    {
      "name": "remoteClusters",
      "bundlesCount": 1,
      "totalSize": 9730,
      "bundles": [
        {
          "name": "remoteClusters.plugin.js",
          "transferredSize": 9730
        }
      ]
    },
    {
      "name": "screenshotMode",
      "bundlesCount": 1,
      "totalSize": 4800,
      "bundles": [
        {
          "name": "screenshotMode.plugin.js",
          "transferredSize": 4800
        }
      ]
    },
    {
      "name": "security",
      "bundlesCount": 4,
      "totalSize": 118549,
      "bundles": [
        {
          "name": "security.chunk.10.js",
          "transferredSize": 40091
        },
        {
          "name": "security.chunk.13.js",
          "transferredSize": 15982
        },
        {
          "name": "security.chunk.7.js",
          "transferredSize": 7318
        },
        {
          "name": "security.plugin.js",
          "transferredSize": 55158
        }
      ]
    },
    {
      "name": "spaces",
      "bundlesCount": 1,
      "totalSize": 29747,
      "bundles": [
        {
          "name": "spaces.plugin.js",
          "transferredSize": 29747
        }
      ]
    },
    {
      "name": "telemetry",
      "bundlesCount": 1,
      "totalSize": 23780,
      "bundles": [
        {
          "name": "telemetry.plugin.js",
          "transferredSize": 23780
        }
      ]
    },
    {
      "name": "usageCollection",
      "bundlesCount": 1,
      "totalSize": 6727,
      "bundles": [
        {
          "name": "usageCollection.plugin.js",
          "transferredSize": 6727
        }
      ]
    }
  ]
}
@azasypkin azasypkin added the bug Fixes for quality problems that affect the customer experience label Mar 4, 2025
@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 4, 2025
@azasypkin azasypkin added chore triage_needed Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! and removed bug Fixes for quality problems that affect the customer experience needs-team Issues missing a team label labels Mar 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed
Projects
None yet
Development

No branches or pull requests

2 participants