Unsubscribing from PubNub slows down the entire web application

I noticed that my JS application sometimes slows down (all UIs slow down). I tried to understand why, and I noticed that the PUBNUB event to cancel the subscription is really hard. All other PUBNUB events, such as status, subscription, work well.

It should be asynchronous, I know, but even being asynchronous, it slows down the entire application, even when it is very simple.

I use the presence of pubnub.

Chrome profile

Do you know that this is happening? Is this a pubnub bug? And how to improve its performance.

+7
javascript websocket pubnub
source share
1 answer

Just post the content of the second comment above as an answer to this post.

You can enable implicit vacation events in your account by contacting support@pubnub.com and ask to enable the TCP_FIN processing function in your account. This will place event vacation processing on the PubNub and your client network servers. This allows you to disable explicit vacation events by setting the noleave flag noleave true.

By following these steps, your page speeds to a normal level of performance.

It's simple ... with the PubNub JavaScript SDK v3.7.14, sendBeacon is transparently implemented by our SDK, if the browser supports it .

0
source share

All Articles