Hi,
Using this component for an heavy usage (some pages can have up to 6-8 event listeners).
The question here is that for each "listener" at least 2 events (TokenReceived and ConnectionOpened) are fired and the webblock is clicking buttons which will fire events with ajax requests.
We are not listening those 2 events, but the webblock is clicking the buttons anyway, so for a screen with 8 event listeners, we have 16 "Loading..." flashes which delays the page and user interaction.
My suggestion is to have a parameter with a structure of booleans to indicate if we want the webblock to fire those events, and in case of false, the component doesn't click any button avoiding Ajax requests and Screen Logs (on ServiceCenter).
For now we will rollback the usage to the old Pusher API. But we are looking forward to have some kind of improvement to avoid all those points stated above.
Can anybody from the team help?
Thanks
Hi André,
That's a very good point, I missed that when porting this client from the Reactive solution. These events are opiniated and not a part of the protocol. I will address that on the next release, and make it optional on the traditional client, but I don't expect it to be this year.
Regarding your issue still, please allow me to bring to your attention a couple of points:
- The browsers under HTTP/1 protocol will only allow for 6 concurrent requests to be handled at the same time. This means that if you have 6 SSE channels, your page won't be able to make any other request. This is not the case however with HTTP/2 or 3, so please do check that your server is using those.
- The SSE comes with the ability to add custom named events to a single channel. If appropriate, you can have a single channel with those 6-8 custom named events, effectively using a single channel connection for the entire thing. Of course that, if you are already using named events on your channels this is not appropriate, and you would have to re-wire your hub.
Thanks for reaching out