Peter Lin
Fri, 22 Nov 2002 20:00:31 -0800
hey kin-man,
that sounds great! I was actually thinking along those lines a while back, but
thought it was impracticle because the project I was working one didn't have enough
time to explore that approach.
when I was doing performance analysis of jasper1 with jslt and saw how bad the
performance was (due to the nested try/catch bug), I went through and manually wrote
scriplet code to do the same exact logic. The performance compared to jasper1 + jstl
was tremendous. I had full mockups of a 3 pages written in JSTL and pure scriplet.
If memory serves me correctly, the difference was 5-8x. the JSTL version using jasper1
would take 900-1000ms+ to display 15 results. The same exact page using scriplet took
about 100-150ms. I would definitely be interested in spending time on this and
assisting. I may have some time opening up next year, so I hope to start contributing
actively :)
cross my fingers.
peter lin
Kin-Man Chung <[EMAIL PROTECTED]> wrote:I am designing a framework in Jasper
for enabling plugins that
work closely with Jasper to generate Java codes instead of calls
to tag handlers. The main idea is to take take JSTL tags, such as
${i}
and generates the Java codes
for (int i = 0; i <= 100; i++) {
pageContext.setAttribute("i", String.valueOf(i));
out.print(evaluate("${i}"));
}
or even
for (int i = 0; i <= 100; i++) {
out.print(i);
}
The design is not to do the actual optimization in Jasper, but to
provide a framework for taglib writers to develop plugins to Jasper
that will do the actual optimization. Eventually, Jasper will be
bundled with 1 or 2 plugins for JSTL, as test cases for the framework
and as examples for writing the plugins.
The plugins are specified in a xml file:
the name of the tag class
the name of the pkugin class
There are currently 3 interfaces:
TagPluginFactory
Used for creating a TagPlugin.
TagPlugin
Created at code generation time for a specific tag invokation. Used
by Jasper to generate java codes.
TagPlugContext
Created by Japser and used by the plugin to query properties of
the current tag, and to use resources in Jasper.
This work is at the very early stage of the design, and is purely
experimental. I'll be checking in sources for this work, and they
should not affect the other part of Jasper, when plugins are not
turned on.
I welcome comments and suggestions.
--
To unsubscribe, e-mail:
For additional commands, e-mail:
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now