Re: Will Using Tagged Libraries Affect Performance
Hi, I too doubt about this. Please let me know. --- [EMAIL PROTECTED] wrote: Hi, I have got a basic doubt , Will using Tagged Libraries , affect performance Please do send any articles related to these. Thanks in advance Regards anushaa.j This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Will Using Tagged Libraries Affect Performance
I think it could have a negative impact on performance. Why? Many servlet containers will instantiate and then throw away the tag handler class with each use on the page. So, if a tag handler requires lots of setup (e.g. connect to a database, issue a query, check some session or request attributes) then it could add significant time to the loading of a page. Burr [EMAIL PROTECTED] - Original Message - From: rao srinivas [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 8:16 AM Subject: Re: Will Using Tagged Libraries Affect Performance Hi, I too doubt about this. Please let me know. --- [EMAIL PROTECTED] wrote: Hi, I have got a basic doubt , Will using Tagged Libraries , affect performance Please do send any articles related to these. Thanks in advance Regards anushaa.j This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Will Using Tagged Libraries Affect Performance
On Wed, 27 Feb 2002, Burr Sutter wrote: I think it could have a negative impact on performance. Why? Many servlet containers will instantiate and then throw away the tag handler class with each use on the page. So, if a tag handler requires lots of setup (e.g. connect to a database, issue a query, check some session or request attributes) then it could add significant time to the loading of a page. Right. Since instantiation itself is considerably cheaper than most developers expect, though, a properly written tag handler can get around these issues. For instance, connection pooling in general is recognized as a useful methodology; a tag handler's constructor shouldn't ordinarily need to open a database connection from scratch. In general, tags (by themselves) shouldn't have a substantial effect on performance. The only thing that a simple tag adds, in comparison to a corresponding scriptlet, is a few function invocations; in a proper JIT, these ought to be extremely cheap. (BodyTag implementations do require the container to buffer body content, which can have a performance cost, especially if the body content is extremely large.) But assuming that the operations are like those you list (connect to a database, issue a query, check some session or request attribute), the difference between doing this in a scriplet and doing it in a tag should be relatively minor. How minor? As a ballpark figure, using the Benchmark Taglib on my Linux server at home, I don't notice any significant difference between constructs like benchmark:duration % for (int i = 0; i 1; i++) { % % if (Math.random() 0.5) { %foo% } % % } % /benchmark:duration and benchmark:duration % for (int i = 0; i 1; i++) { % c_rt:if test=%= Math.random() 0.5 %foo/c_rt:if % } % /benchmark:duration Even the optimizations that some containers make, pooling tag handlers, probably won't be particularly noticeable except in extremely tight loops (like do this 1 times) when tag handlers are written properly. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this spring from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Will Using Tagged Libraries Affect Performance
It has been suggested that tomcat 4s handing of taglibs isn't as optimized as the rest of the server. Do you guys know anything more about it and in that case can it be that the Struts tags issue mentioned below is partly due to this problem ? I guess this issue might also be asked on the tomcat lists but since I'm a gui developer this is my forum ;) Esp. since we are in the process of making the design decision of how to decouple the presentation of the business logic from the design, and where to put it. The MVC model is granted, its more an issue of beans and/or taglibs. The performance issue is of course interesting in making such a decision /Maya maya retzlaff | [EMAIL PROTECTED]| http://www.windh.net/ -Original Message- From: Burr Sutter [mailto:[EMAIL PROTECTED]] Sent: den 27 februari 2002 17:42 To: Tag Libraries Users List Subject: Re: Will Using Tagged Libraries Affect Performance Many folks have reported issues with the Struts custom tags. Specifically in the areas of internationalizing every on screen piece of text as well as long select lists where the contents are dynamically generated via a custom tag. The alternative is to hard-code the mult-lingual translations into different JSPs or go with XML+XSL (which is also slower by comparison). And hard-code the list-box choices as HTML. In the case of Struts the entire page is built with custom tags. Virtually no basic HTML in the page therefore it is slower than the comparable JSP. So, I was comparing custom tags to HTML tags not scriplets. Most new custom tag developers seem to make that comparison for some reason. Obviously you get a lot more functionality (dynamic instead of static) but some folks forget about that, just complain about speed. Burr -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]