Performance: First NestJS application
MEDIUM IMPACT
This affects server startup time and initial response speed, impacting how fast the first page or API response is delivered to the user.
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ imports: [], controllers: [AppController], providers: [AppService], }) export class AppModule {}
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { HeavyModule } from './heavy.module'; @Module({ imports: [HeavyModule], controllers: [AppController], providers: [AppService], }) export class AppModule {}
| Pattern | Server Startup Time | Initial Response Delay | Resource Usage | Verdict |
|---|---|---|---|---|
| Including heavy modules at startup | High (300-500ms extra) | Delayed by 300-500ms | High CPU and memory | [X] Bad |
| Minimal modules at startup | Low (fast startup) | Minimal delay | Low resource usage | [OK] Good |