-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The handler chain is created via HandlerFactory.CreateHandlerChain for every gateway event received.
While functional, this approach introduces unnecessary object allocations and makes it harder to share state across handlers.
Problem
- Repeated object creation per event
- Increased allocation and GC pressure
- Architecture not well suited for future extensions (e.g. views, callback caching)
Suggested improvement
- Instantiate the handler chain once per gateway connection
- Reuse the same instance throughout the gateway lifecycle
Impact
- Reduced allocation overhead
- More predictable execution flow
- Stronger architectural base for upcoming features
Metadata
Metadata
Assignees
Labels
No labels