Struts 2
  1. Struts 2
  2. WW-3805

Struts2 request-> response time is considerably increased.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.3, 2.3.4
    • Fix Version/s: 2.3.4
    • Component/s: Dispatch Filter
    • Environment:

      Jboss AS 7.1.1 Final, Struts-2.3.4, Sitemesh, EAR Deployment, Windows 7

      Description

      Struts2 > 2.3.1.2 is remarkably very slow when we compare it with struts2 2.3.1.2

      I found struts2 application is getting slow when we use

      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
      

      When i use StrutsPrepareAndExecuteFilter the performance is pretty good like before. But it will mess up the sitemesh integration.

        Activity

        Hide
        Lukasz Lenart added a comment -

        You mean even without Sitemesh switching into these two filters slow down an application ?

        Show
        Lukasz Lenart added a comment - You mean even without Sitemesh switching into these two filters slow down an application ?
        Hide
        nick added a comment - - edited

        I mean its invoking Prepare -> sitemesh -> Execute filters but the request time to hit my Action and to see my result page (response) time is incredibly increased.

        That i haven't tried without sitemesh, that i can try . But it was working perfectly in struts2.3.1.2 with sitemesh filter (same settings).

        Show
        nick added a comment - - edited I mean its invoking Prepare -> sitemesh -> Execute filters but the request time to hit my Action and to see my result page (response) time is incredibly increased. That i haven't tried without sitemesh, that i can try . But it was working perfectly in struts2.3.1.2 with sitemesh filter (same settings).
        Hide
        nick added a comment -

        I tried with out sitemesh still its same... but now the point is not that i figured out when it get slow.
        ie when i set

        <constant name="struts.devMode" value="true" />
        

        but we where not facing this in struts2.3.1.2

        Now you can take a call on this .

        Show
        nick added a comment - I tried with out sitemesh still its same... but now the point is not that i figured out when it get slow. ie when i set <constant name= "struts.devMode" value= "true" /> but we where not facing this in struts2.3.1.2 Now you can take a call on this .
        Hide
        Lukasz Lenart added a comment - - edited

        I think it's because the devMode was improved I mean, right now it reloads all the classes and configuration on each request even when the Convention Plugin is used. Before there were some problems with that, which means the configuration was n't reloaded, though.

        Show
        Lukasz Lenart added a comment - - edited I think it's because the devMode was improved I mean, right now it reloads all the classes and configuration on each request even when the Convention Plugin is used. Before there were some problems with that, which means the configuration was n't reloaded, though.
        Hide
        nick added a comment -

        Thats correct . So wats the conclusion ?

        Show
        nick added a comment - Thats correct . So wats the conclusion ?
        Hide
        Lukasz Lenart added a comment -

        the devMode cannot be used in production, during development it shouldn't be a huge problem.

        Show
        Lukasz Lenart added a comment - the devMode cannot be used in production, during development it shouldn't be a huge problem.
        Hide
        nick added a comment - - edited

        Thats correct but it has become a problem in dev environment due its huge response time breaking most of our Ajax calls. So in context for us <constant name="struts.devMode" value="true" /> become useless .

        I don't know wat strategy you gonna take on this...
        If you are not going to do any fix for it then i have to inform my fellow works that "struts.devMode = true" is gonna cause you .

        Is it not possible for you to do something like, when the file got modified then to reload?

        Show
        nick added a comment - - edited Thats correct but it has become a problem in dev environment due its huge response time breaking most of our Ajax calls. So in context for us <constant name="struts.devMode" value="true" /> become useless . I don't know wat strategy you gonna take on this... If you are not going to do any fix for it then i have to inform my fellow works that "struts.devMode = true" is gonna cause you . Is it not possible for you to do something like, when the file got modified then to reload?
        Hide
        Lukasz Lenart added a comment -

        It should work that way, only reload configuration if at least one file was modified. But I think you are right, something changed so when I've been testing the Convention Plugin problem on JBoss 7.1 configuration was reloaded on each request, even if I changed nothing.

        Show
        Lukasz Lenart added a comment - It should work that way, only reload configuration if at least one file was modified. But I think you are right, something changed so when I've been testing the Convention Plugin problem on JBoss 7.1 configuration was reloaded on each request, even if I changed nothing.
        Hide
        nick added a comment -

        Thats correct . If you experienced this phenomenon only in JBoss AS 7 then sometimes Jboss AS 7 is doing something with these jars, don't know.

        Show
        nick added a comment - Thats correct . If you experienced this phenomenon only in JBoss AS 7 then sometimes Jboss AS 7 is doing something with these jars, don't know.
        Hide
        Lukasz Lenart added a comment - - edited

        Looks like my FileManager refactorings broke something, DefaultFileManagers doesn't keep proper Revisions, that's why the config is reloaded each time :/

        Show
        Lukasz Lenart added a comment - - edited Looks like my FileManager refactorings broke something, DefaultFileManagers doesn't keep proper Revisions, that's why the config is reloaded each time :/
        Hide
        nick added a comment - - edited

        Okay... since it was working perfectly in older version hopefully something went wrong.

        Show
        nick added a comment - - edited Okay... since it was working perfectly in older version hopefully something went wrong.
        Hide
        Lukasz Lenart added a comment -

        Please test the latest snapshot, should be solved.

        Show
        Lukasz Lenart added a comment - Please test the latest snapshot, should be solved.
        Hide
        nick added a comment -

        Nope it didn't

        Show
        nick added a comment - Nope it didn't
        Hide
        Lukasz Lenart added a comment -

        Wait for Hudson when it posts comment here

        Show
        Lukasz Lenart added a comment - Wait for Hudson when it posts comment here
        Hide
        Hudson added a comment -

        Integrated in Struts2 #466 (See https://builds.apache.org/job/Struts2/466/)
        WW-3805 solves problem with reloading configuration on each request even no changes to file (Revision 1331402)

        Result = SUCCESS
        lukaszlenart :
        Files :

        • /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java
        Show
        Hudson added a comment - Integrated in Struts2 #466 (See https://builds.apache.org/job/Struts2/466/ ) WW-3805 solves problem with reloading configuration on each request even no changes to file (Revision 1331402) Result = SUCCESS lukaszlenart : Files : /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java
        Hide
        nick added a comment - - edited

        Yeah it got solved too thanks... oh by the way i came to know hudson is not a physical guy but our Jenkin's father

        Show
        nick added a comment - - edited Yeah it got solved too thanks... oh by the way i came to know hudson is not a physical guy but our Jenkin's father
        Hide
        Lukasz Lenart added a comment -

        Solved, thanks for support and testing!

        Show
        Lukasz Lenart added a comment - Solved, thanks for support and testing!

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            nick
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development