Closed tegefaulkes closed 8 months ago
@amydevs this is a performance issue. You want to be aware of this when listening for events, or when you are dispatching events.
This has been addressed by commit 82e4a433ebb5d2af94cefcaf0d0a348873189100.
All of the above event names should be QUIC
not Quic
, I think they were typos.
In summary:
This is not a choice that can be done in js-events
, this is context dependent on the user.
The same choices occur with observable reactive properties later.
Specification
Events such as the
EventQuicStreamSend
andEventQuicConnectionSend
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 inQUICStream
and then cloned and dispatched in theQUICConnection
,QuicClient
,QuicServer
, and inPolykey
through theNodeConnection
andNodeConnectionManager
. As a result aQUICStream
event can be cloned 4-ish times. This will be a severe performance hit forsend
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 theEventQuicStreamSend
and inside theQUICSocket
for theEventQUICConnectionSend
event.Additional context
Tasks