Performance: Swagger UI integration
MEDIUM IMPACT
This affects the initial page load speed and bundle size of the API documentation interface.
Configure HTTP caching headers for Swagger UI static resources and enable lazy loading of Swagger UI only when needed
springdoc-openapi-ui dependency included without any resource caching or lazy loading configuration| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Load full Swagger UI on every page load | High (many nodes for UI) | Multiple reflows due to script execution | High paint cost for UI elements | [X] Bad |
| Lazy load Swagger UI on demand with caching | Low (only when needed) | Single reflow after load | Lower paint cost | [OK] Good |