Performance: Why interceptors add cross-cutting logic
MEDIUM IMPACT
Interceptors affect the request-response cycle timing and can impact interaction responsiveness by adding extra processing steps.
Use lightweight, asynchronous interceptors that delegate heavy work outside the request cycle or use caching.Use interceptors that perform heavy synchronous operations or blocking calls inside intercept method.| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Heavy synchronous interceptor logic | N/A (server-side) | N/A | N/A | [X] Bad |
| Lightweight asynchronous interceptor logic | N/A | N/A | N/A | [OK] Good |