You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/08/14 08:28:58 UTC

[Bug 53713] New: Performance tuning solution for JspReader

https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

          Priority: P2
            Bug ID: 53713
          Assignee: dev@tomcat.apache.org
           Summary: Performance tuning solution for JspReader
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: xshao@ebay.com
          Hardware: All
            Status: NEW
           Version: trunk
         Component: Jasper
           Product: Tomcat 7

Created attachment 29223
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29223&action=edit
patch for JspReader.java

mark() is called so many times when doing JSP or tag files compilation.
This can be reduced by a little bit code changes.

Attached files contain this solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #10 from Mark Thomas <ma...@apache.org> ---
Nice improvement. I'll take a closer look at the patch with a view to including
it in the next release.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Sheldon Shao <xs...@ebay.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29224|0                           |1
        is obsolete|                            |

--- Comment #4 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29243
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29243&action=edit
Patch for Mark.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Sheldon Shao <xs...@ebay.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29223|0                           |1
           is patch|                            |
  Attachment #29223|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #7 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29246
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29246&action=edit
OldMark.java renamed from the original Mark.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #5 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29244
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29244&action=edit
Comparison test case for JspReader

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
           Severity|normal                      |enhancement

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Moving to enhancement since there is no bug here.

Please provide a test case that demonstrates the performance improvement.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Mark Thomas <ma...@apache.org> ---
Thanks for the patch. It has been applied (with slight formatting changes) to
trunk and 7.0.x and will be included in 7.0.31 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #12 from Eugene Chung (TmaxSoft) <bl...@gmail.com> ---
Shall JspReadler be thread-safe? Why is the member sourceFiles
java.util.Vector?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #1 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29224
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29224&action=edit
Patch for Mark.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #6 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29245
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29245&action=edit
OldJspReader.java renamed from original JspReader.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #13 from Sheldon Shao <xs...@ebay.com> ---
Yes, this is a good question.  It was a Vector before this fix.
Could we change the typeto ArrayList ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29244|application/octet-stream    |text/plain
          mime type|                            |

--- Comment #9 from Mark Thomas <ma...@apache.org> ---
Comment on attachment 29244
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29244
Comparison test case for JspReader

Change mime type

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

--- Comment #8 from Sheldon Shao <xs...@ebay.com> ---
Test case for comparison,

Webapp test/webapp-2.3 New JspReader:529
Webapp test/webapp-2.3 Old JspReader:2256

Webapp test/webapp-2.4 New JspReader:362
Webapp test/webapp-2.4 Old JspReader:1392

Webapp test/webapp-2.5 New JspReader:441
Webapp test/webapp-2.5 Old JspReader:1338

Webapp test/webapp-3.0 New JspReader:9525
Webapp test/webapp-3.0 Old JspReader:26608

Webapp test/webapp-3.0-fragments New JspReader:1416
Webapp test/webapp-3.0-fragments Old JspReader:3417

Webapp test/webapp-3.0-servletsecurity2 New JspReader:406
Webapp test/webapp-3.0-servletsecurity2 Old JspReader:1011

Webapp test/webapp-3.0-virtual-webapp New JspReader:2495
Webapp test/webapp-3.0-virtual-webapp Old JspReader:4935


Here is part of the test case,

                 int count = 1000;
        long start = System.currentTimeMillis();
        for(int i = 0; i < count; i ++) {
            goThroughAllJsp(appDir, true);
        }
        System.out.println("Webapp " + folder + " New JspReader:"
                + (System.currentTimeMillis() - start));
        start = System.currentTimeMillis();
        for(int i = 0; i < count; i ++) {
            goThroughAllJsp(appDir, false);
        }
        System.out.println("Webapp " + folder + " Old JspReader:"
                + (System.currentTimeMillis() - start));

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53713] Performance tuning solution for JspReader

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53713

Sheldon Shao <xs...@ebay.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29223|0                           |1
        is obsolete|                            |

--- Comment #3 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29242
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29242&action=edit
Patch for JspReader.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org