struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-3941) Performance Problems after Upgrade Project to 2.3.7
Date Thu, 13 Dec 2012 10:46:14 GMT

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

Lukasz Lenart edited comment on WW-3941 at 12/13/12 10:44 AM:
--------------------------------------------------------------

The problem is related to my FileManager refactorings and introduced FileManagerFactory with
default implementation

ConfigurationManager#conditionalReload() from version 2.3.7 looks like this:

{code:java}
public synchronized void conditionalReload(Container container) {
    FileManager fileManager = container.getInstance(FileManagerFactory.class).getFileManager();
    if (fileManager.isReloadingConfigs() || providersChanged) {
    ........
}
{code}

so each time FileManager instance was looked up just to check if reloadConfigs flag is set
to true, but right now it looks like this and the flag is checked directly

{code:java}
public synchronized void conditionalReload(Container container) {
    boolean reloadConfigs = Boolean.parseBoolean(container.getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION));
    if (reloadConfigs || providersChanged) {
    ........
}
{code}
                
      was (Author: lukaszlenart):
    The problem is related to my FileManager refactorings and introduced FileManagerFactory
with default implementation

ConfigurationManager#conditionalReload() from version 2.3.7 looks like this:

{code:java}
public synchronized void conditionalReload(Container container) {
    FileManager fileManager = container.getInstance(FileManagerFactory.class).getFileManager();
    if (fileManager.isReloadingConfigs() || providersChanged) {
    ........
}
{code}

so each time FileManager instance was looked up just to check if
reloadConfigs flag is set to true, but right now it looks like this
and the flag is checked directly

{code:java}
public synchronized void conditionalReload(Container container) {
    boolean reloadConfigs = Boolean.parseBoolean(container.getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION));
    if (reloadConfigs || providersChanged) {
    ........
}
{code}
                  
> Performance Problems after Upgrade Project to 2.3.7
> ---------------------------------------------------
>
>                 Key: WW-3941
>                 URL: https://issues.apache.org/jira/browse/WW-3941
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.7
>            Reporter: Johannes Geppert
>            Assignee: Lukasz Lenart
>              Labels: freemarker, performance
>             Fix For: 2.3.8
>
>         Attachments: struts2_2.3.4_firebug.JPG, struts2_2.3.7_firebug.JPG
>
>
> After upgrading a Project to the latest Version 2.3.7 I figured out some performance
problems.
> I have a Action which renders around 240kb HTML Code for an Print View.
> Struts 2.3.4: 5s
> Struts 2.3.7: 15s
> I'm not really familiar with profiling but I guess this is related to freemarker.
> <constant name="struts.freemarker.templatesCache" value="true" />
> <constant name="struts.freemarker.templatesCache.updateDelay" value="60000" />
> <constant name="struts.freemarker.mru.max.strong.size" value="0" />	

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message