[ 
https://issues.apache.org/jira/browse/WICKET-6692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907207#comment-16907207
 ] 

Martin Grigorov commented on WICKET-6692:
-----------------------------------------

This is how it behaved since day 1 of Wicket Native WebSocket integration.

I agree that most probably most of the applications do not care about this 
event and can avoid the unnecessary deserialization.

I'll see whether this can be made configurable.

> Page deserialization on websocket close - possible performance issue
> --------------------------------------------------------------------
>
>                 Key: WICKET-6692
>                 URL: https://issues.apache.org/jira/browse/WICKET-6692
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-native-websocket
>    Affects Versions: 6.30.0, 8.5.0
>            Reporter: Daniel Stoch
>            Assignee: Martin Grigorov
>            Priority: Major
>         Attachments: websocket-deser-onclose.zip
>
>
> 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:
> {code}
>  broadcastMessage(new ClosedMessage(getApplication(), getSessionId(), key));
> {code}
> 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).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to