[ 
https://issues.apache.org/jira/browse/WW-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart resolved WW-5359.
-------------------------------
    Resolution: Fixed

> Improved the StrutsUrlDecoder so that charset retrieval is performed only once
> ------------------------------------------------------------------------------
>
>                 Key: WW-5359
>                 URL: https://issues.apache.org/jira/browse/WW-5359
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 6.1.1
>            Reporter: Tatsuo Tsuchie
>            Priority: Major
>             Fix For: 6.4.0
>
>
> * StutsUrlDecoder has performance problems when run from multiple threads, 
> because 
> [Charset#availavleCharts(...)|https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/share/classes/java/nio/charset/Charset.java#L569-L588]
>  called {{StrutsUrlDecoder#getCharset(...)}} is synchronized blocked.
>  ** Root causes is synchronized blocked at 
> [AbstractCharsetProvider#charsets()|https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/jdk.charsets/share/classes/sun/nio/cs/ext/AbstractCharsetProvider.java#L174-L177]
>  .
>  ** StutsUrlDecoder is used to evaluate custom tag 
> [<s:url>|https://struts.apache.org/tag-developers/url-tag], it will have 
> performance problems if it receives too many requests.
>  * Therefore, {{Charset#availavleCharts(...)}} to be executed only once 
> during the StrutsUrlDecoder initialization.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to