Performance: How Angular bootstraps an application
MEDIUM IMPACT
This affects the initial page load speed and time to interactive by controlling how Angular initializes and renders the app.
bootstrapApplication(AppComponent).catch(err => console.error(err));
platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.error(err));
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Dynamic bootstrapModule | High (loads full module tree) | Multiple reflows during init | High paint cost due to delayed render | [X] Bad |
| Standalone bootstrapApplication | Lower (only root component) | Single reflow after init | Lower paint cost, faster render | [OK] Good |