cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durrant, Peter" <Peter.Durr...@COGNOS.com>
Subject XSP generated classes
Date Thu, 31 Jan 2002 12:23:55 GMT
Hi

I'm posting this question again since my original posting was
misinterpreted.

I'm interested to know if there is a run-time efficiency gain to be made by
putting classes in a library (jar file) rather than defined on each page
(e.g. through the application of a logicsheet):

When an XSP page containing class definitions is generated we get in the
"Tomcat work" directory a series of class files: 1 for the XSP and 1 for
each class defined in the XSP page.

e.g. if I have two pages called MY_PAGE1.xsp and MY_PAGE2.xsp with classes
Class1 and Class2 in both then:
        MY_PAGE1_xsp.class
        MY_PAGE1_xsp$Class1.class
        MY_PAGE1_xsp$Class2.class
and
        MY_PAGE2_xsp.class
        MY_PAGE2_xsp$Class1.class
        MY_PAGE2_xsp$Class2.class
will get generated. Obviously *Class1.class and *Class2.class are identical
for each page.


The implication of this (I'm sure) must be inefficiency.


Questions:
----------
Does having many repeated (e.g. helper classes) provide a run-time
inefficiency (i.e. in cases where that code -- for example Class1 and Class2
-- could reside in a library)?


I can immediately see that for the first time a Cocoon-based application is
used you can save the compilation time on xsp pages if the classes are in a
lib. The question is, does this efficiency also extend to subsequent page
requests?


If there is an efficiency saving to be made by creating our own libraries
then it would help developers using Cocoon to ensure that our development
strategy is biased towards creating our own libraries rather than placing
helper classes in logicsheets.


Cheers
Pete
---
Cognos, London, UK



This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message