Performance: Generating client code from spec
MEDIUM IMPACT
This affects page load speed by increasing initial bundle size and can delay first contentful paint if client code is large or blocking.
public class ApiClient {
// Split generated client code into modules
// Load only needed endpoints on demand (lazy loading)
}public class ApiClient { // Entire generated client code with all endpoints and models // Included and loaded eagerly in main bundle }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Eagerly load full generated client code | Minimal DOM impact | 0 reflows | No direct paint cost | [X] Bad |
| Lazy load generated client code modules | Minimal DOM impact | 0 reflows | No direct paint cost | [OK] Good |