Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.30.0, 8.5.0
-
None
Description
We have a page with websocket connection (using WebSocketBehavior). When user navigates to another page, a websocket connection is closed and AbstractWebSocketProcessor.onClose method is called. This causes broadcasting a message to connected page:
broadcastMessage(new ClosedMessage(getApplication(), getSessionId(), key));
and leads to page deserialisation (from PageStore).
I wonder how it can affect performance: almost every page navigation causes page deserialization (when it should occur only for back button or when some websocket message comes and application need to process it).
Maybe this message should be send only when needed or maybe I should not care and current behaviour does not affect performance?
I have attached a simple quick start:
- click links to navigate between pages: “Nav 1” and “Home”,
- after each click you can see “>> Closed message: …” on System.out (so closed message was sent),
- AbstractWebSocketProcessor broadcast a ClosedMessage to a page, which causes its deserialization (you can debug IPageStore.getPage call).