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 2010/01/22 13:59:37 UTC

DO NOT REPLY [Bug 48600] New: Perfomance issue with tags

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

           Summary: Perfomance issue with tags
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: adrien.futschik@atosorigin.com


When upgrading from Tomcat 5.5.x to Tomcat 6.0.x we are experiencing
performance issues.

We are using the same exact application in both versions. The application uses
JSP & tags.

Here is a quick list of the average loading time recorded (in ms) using Jmeter
:

Tomcat 5.5.23 : 32
Tomcat 6.0.18 / 6.0.20 : 143

When positioning the metadata-complete="true" in the web.xml file the loading
are much better :

Tomcat 6.0.18 / 6.0.20 : 34

How would you explain this ?

The metadata-complete="true" parameter is not a real solution for us because we
would like to use annotations in the future.

Adrien

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

adrien.futschik@atosorigin.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Perfomance issue with tags  |Performance issue with tags

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #5 from Mark Thomas <ma...@apache.org> 2010-02-02 09:02:28 GMT ---
Very little I am afraid. All we have is in the test dir.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #11 from Philippe Prados <ap...@prados.fr> 2010-03-08 11:03:45 UTC ---
Ok. It's correct with JBoss but no with Tomcat.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #8 from Remy Maucherat <re...@apache.org> 2010-02-16 13:44:56 UTC ---
(In reply to comment #6)
> JBoss use a DummpAnnotationProcessor to remove this capabilities. I think, now,
> JBoss can use this new version.

Which version of JBoss AS are you talking about ? If it's branch 4.2, then it
doesn't support EE 5, so it's not supposed to be doing injection. That makes
things simpler obviously.

JBoss AS (for the releases that do injection) uses an implementation of
Tomcat's instance manager (which may or may not perform better, as I didn't
micro bench it).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #3 from Mark Thomas <ma...@apache.org> 2010-02-02 03:18:55 GMT ---
Patches are always welcome

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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 48600] Performance issue with tags

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

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

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

--- Comment #13 from Mark Thomas <ma...@apache.org> ---
Caching has been added in the 7.0.x series but will not be back-ported to
6.0.x.

-- 
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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Jorge <jo...@atosorigin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jorge.diaz@atosorigin.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

patches@portaildulibre.fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gilles.bardouillet@atosorig |patches@portaildulibre.fr
                   |in.com                      |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

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

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

--- Comment #1 from Mark Thomas <ma...@apache.org> 2010-02-01 16:43:18 GMT ---
I can't see anything that would impact per request. You are going to take a hit
on the annotation scanning on first load. A profiler will tell you more.

This is really a topic more suited to the users list. Please follow up there.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Philippe Prados <ap...@prados.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@prados.fr

--- Comment #9 from Philippe Prados <ap...@prados.fr> 2010-02-16 15:44:54 UTC ---
With JBoss 5.0.0 GA, the class 
org.apache.catalina.core.StandardContext.DummyAnnotationProcessor
implements an empty processor.
It's hard coding to use this "special" version.

Philippe Prados

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #7 from Remy Maucherat <re...@apache.org> 2010-02-16 13:00:02 UTC ---
*** Bug 48750 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Jorge <jo...@atosorigin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jorge.diaz@atosorigin.com   |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Philippe Prados <ap...@prados.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #2 from Philippe Prados <ap...@prados.fr> 2010-02-02 02:35:18 UTC ---
With Tomcat 6.0.x, when the metadata-complete is set to true, the
AnnotationProcessor is empty, and all annotation like @Resources in tag are not
managed.

I think the spec never say that.

The performance issues is due to the presence of AnnotationProcessor with a
page with many tags. Because the implementation have not a cache, and manage
all the super class (to class Object !), a big loop is present for each
attributs, each methods, for each tag classes and super classes, before and
after the tag.

We think it's may be better to add a cache to remember of classes with or
without annotations.

Philippe

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Michael Heinen <mh...@recommind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mhn@recommind.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

gbt <gi...@atosorigin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gilles.bardouillet@atosorig
                   |                            |in.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #12 from Philippe Prados <ap...@prados.fr> 2010-05-07 11:11:28 EDT ---
Do you do something to optimize the code ?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Philippe Prados <ap...@prados.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #4 from adrien.futschik@atosorigin.com 2010-02-02 09:01:02 UTC ---
(In reply to comment #3)
> Patches are always welcome

We are working on a patch based on TRUNK to implement a cache and are trying to
test out DefaultAnnotationProcessor.java. Our solution improves performance
drastically but we need to test it more deeply.

Do you have some unit-tests for this class ?

Adrien

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #10 from Remy Maucherat <re...@apache.org> 2010-02-18 17:40:37 UTC ---
(In reply to comment #9)
> With JBoss 5.0.0 GA, the class 
> org.apache.catalina.core.StandardContext.DummyAnnotationProcessor
> implements an empty processor.
> It's hard coding to use this "special" version.

Yes, but this "implementation" does nothing but delegate to the
InstanceManager, which then does the same things as Tomcat's
AnnotationProcessor (except slightly slower). For some background history, the
AnnotationProcessor interface was replaced with the InstanceManager interface
to also take over the object instance creation.

AS 5 scans injections ahead of time, so it does what your caching does more or
less. The main problem here is that the newer JSP specs made tags non poolable
in many cases, *and* injectable. Not a very good plan ...

BTW, your patch would need some syncs I think.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

--- Comment #6 from Philippe Prados <ap...@prados.fr> 2010-02-04 01:28:14 UTC ---
Created an attachment (id=24924)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24924)
Patch to add cache in DefaultAnnotationProcessor

With some test case, this version is 6 times faster !

JBoss use a DummpAnnotationProcessor to remove this capabilities. I think, now,
JBoss can use this new version.

Regards

Philippe Prados

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 48600] Performance issue with tags

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

Adrien Geffroy <ag...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ageffroy@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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