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

Sverre Boschman commented on WICKET-4164:
-----------------------------------------

You also changed the test itself by using the CopyOnWriteArrayList, which seems 
to have a very big impact on the performance (changed it to 10k iterations and 
it is already running for minutes using the old StoredResponsesMap code...). My 
previous observation was based on the 'new' unittest with 100 threads and 1000 
iterations against the old StoredResponsesMap and the new StoredResponsesMap. 
The old StoredResponsesMap took 15.1 - 15.2 seconds, while the new 
StoredResponsesMap took 14.8 - 15.0 seconds. Not a dramatic difference, but at 
least it doesn't seem 6 times slower to me.
Funny thing, using the CopyOnWriteArrayList in the test also makes the chances 
the initally reported threading issues occurs in the test and blowing up the 
map smaller.
                
> StoredResponsesMap not threadsafe
> ---------------------------------
>
>                 Key: WICKET-4164
>                 URL: https://issues.apache.org/jira/browse/WICKET-4164
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.1
>            Reporter: Sverre Boschman
>         Attachments: WICKET-4164.patch
>
>
> The StoredResponsesMap is based on the not so threadsafe LinkedHashMap. This 
> map is filled from multiple threads by the WebPageRenderer, which can lead to 
> the internal table property of hashmap going out of sync with the header 
> property of linkedhashmap. As the hashmap entries are not gc'able this leads 
> to out of memory exceptions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to