Performance: Injectable decorator
MEDIUM IMPACT
This affects the dependency injection system's initialization and service instantiation speed, impacting app startup and runtime responsiveness.
@Injectable() class UserRepository {} @Injectable() class UserService { constructor(private readonly repo: UserRepository) {} }
class UserService { constructor() { this.repo = new UserRepository(); } } class UserRepository {}
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual new calls for dependencies | N/A | N/A | N/A | [X] Bad |
| Using @Injectable with DI container | N/A | N/A | N/A | [OK] Good |