Specification
Events such as the EventQuicStreamSend and EventQuicConnectionSend and any other very low level events needs to be excluded from re-dispatch.
Currently events bubble upwards through re-dispatching at every level . A QUICStream event will be created in QUICStream and then cloned and dispatched in the QUICConnection, QuicClient, QuicServer, and in Polykey through the NodeConnection and NodeConnectionManager. As a result a QUICStream event can be cloned 4-ish times. This will be a severe performance hit for send events which are dispatched for every packet.
To solve this, we need to special case and exclude these events from re-dispatch inside the QUICConnection for the EventQuicStreamSend and inside the QUICSocket for the EventQUICConnectionSend event.
Additional context
Tasks
- Exclude all send events from being re-dispatched further than they're needed.
- Review and do the same for any event that happens often through normal usage. 'Once' events can be ignored here.
Specification
Events such as the
EventQuicStreamSendandEventQuicConnectionSendand any other very low level events needs to be excluded from re-dispatch.Currently events bubble upwards through re-dispatching at every level . A
QUICStreamevent will be created inQUICStreamand then cloned and dispatched in theQUICConnection,QuicClient,QuicServer, and inPolykeythrough theNodeConnectionandNodeConnectionManager. As a result aQUICStreamevent can be cloned 4-ish times. This will be a severe performance hit forsendevents which are dispatched for every packet.To solve this, we need to special case and exclude these events from re-dispatch inside the
QUICConnectionfor theEventQuicStreamSendand inside theQUICSocketfor theEventQUICConnectionSendevent.Additional context
Tasks