You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jon Smirl <jo...@mediaone.net> on 2000/08/02 18:36:50 UTC

Java version need? - Summary so far

Replies are falling into three categories:

1) Go for it, four other choices are enough
2) Since JNI is transparent I won't notice and I don't care
3) Java is the one and only true religion, go away heathen

The Java oriented people are forgetting several things:
1) Hotspot is not available on all platforms
2) There is a  group of C based users who can't call the Java code no matter
how fast or good it is.

What is the target audience for the Xalan/Xerces project?

1) Research
2) Transforming large documents (books) off-line
3) Casual use in low traffic site
4) Heavy traffic site with pages begin generated from XSLT
5) Handheld computers
6) Stand alone apps

The priorities for these audiences are not the same and often in conflict.

I'm in category 4.  To satisfy the needs of category 4 XSLT transform times
need to be under 50ms on common hardware, with under 25ms being better.
Right now the C version takes around 500ms and the Java version is worse.

Don't get stuck on the absolute numbers, I'm measuring these on a PII 300.
The bottom line is that Xerces/Xalan is no where near fast enough when you
are trying to achieve 200 hps or better.

At 500 ms I can get 2 hits per second on my test machine.  On the same
hardware Apache will serve 150 hps with static pages. Reasonable XSLT
performance needs to be around 30 hps. Given other overhead this means
Xerces/Xalan needs to be at 20ms on my test hardware.

Right now there is only one choice for a category 4 user, Microsoft's
MSXML3. I'd like to have another choice.  Java users don't have this
problem, they have four or more choices.

Jon Smirl
jonsmirl@mediaone.net


string to xpath

Posted by Aseem Bajaj <as...@intersolutions.stpn.soft.net>.
hi,

    i was trying to find a way to do this... but couldn't find... i wonder
if someone would just direct me where to look for a solution to this?

thanx

aseem

    the attribute to one of the tags in a the xml doc, refers to (is
actually) the xpath expression for certain nodes in the same document. i
want to print the text() in the nodes that are pointed to by that document,
rather than the atribute ( which is an xpath expr ) itself..

my xml file is
-------------

<data>
    <tag1 path="/data/tag2" />
    <tag2>dummy</tag2>
</data>

my xsl is
---------
<xsl:template match="data">
    <xsl:for-each select="//tag1">
        <xsl:value-of select="./@path" />
    </xsl:for-each>
</xsl:template>


the output would be
--------------------
/data/tag2

but i want the output to be
---------------------------
dummy


Re: Java version need? - Summary so far

Posted by Scott Ellsworth <sc...@alodar.com>.
At 12:36 PM 8/2/2000 -0400, Jon Smirl wrote:
>Replies are falling into three categories:
>
>1) Go for it, four other choices are enough
>2) Since JNI is transparent I won't notice and I don't care
>3) Java is the one and only true religion, go away heathen

Given the judgmental way in which you phrased option three, I must insist 
on option 4:

4) Keep the Java version in development.  Possibly add effort to optimize 
the C version, and start a C xalan effort.  Pure Java versions of code are 
convenient for application development, deployment and 
testing.  Development of a pure Java version is needed to make 
xalan/xerces/etc attractive to that audience, and if such a version does 
not exist, we will lose the Java programmers working on it.

>The Java oriented people are forgetting several things:
>1) Hotspot is not available on all platforms
>2) There is a  group of C based users who can't call the Java code no 
>matter how fast or good it is.

The C oriented people are forgetting several things as well:
1) There is a C development group working on xerces.  If the result of 
their code is not fast enough for your needs, then try to convince people 
to optimize that version.
2) If there is interest in a C version of xalan, etc, then start such a 
project.  Given good results, and a set of JNI bindings, you might well 
attract a lot of interest.
3) Complain to vendors if their Java implementation sucks dirt.  I know 
that the IBM jdk for Linux is easily twice as fast as the Sun version.

I have not yet seen a compelling reason to halt development on the Java 
version, though you make a very good case for optimizing both the Java and 
the C versions.  You also make a compelling case for starting a xalan-c 
list and effort.

Frankly, I programmed C++ for 7 years, and will not likely do so again in 
the future, so I, for one, would likely lose interest in contributing to 
xerces/xalan were they only in C/C++.  That said, I have done nothing other 
than contribute a bug report thus far.  I suspect, though, that many of the 
people who have contributed to it thus far would rather leave than work on 
the C version, so success in your endevour would likely result in a loss of 
people contributing.

Scott
Scott Ellsworth
scott@alodar.com


RE: Java version need? - Summary so far

Posted by Randy Waki <rw...@flipdog.com>.
Jon Smirl wrote:
> 
> The Java oriented people are forgetting several things:
> 1) Hotspot is not available on all platforms
> 2) There is a  group of C based users who can't call the Java code no matter
> how fast or good it is.

You're absolutely right.  I don't think anyone is advocating abandonment
of the C/C++ version.  I think the difficulty some of us had with your
suggestion is that you were advocating abandonment of the pure Java
version.  There seems to be a clear need for both.

Best wishes,
Randy


Re: Java version need? - Summary so far

Posted by Scott Ellsworth <sc...@alodar.com>.
At 12:36 PM 8/2/2000 -0400, Jon Smirl wrote:
>Replies are falling into three categories:
>
>1) Go for it, four other choices are enough
>2) Since JNI is transparent I won't notice and I don't care
>3) Java is the one and only true religion, go away heathen

Given the judgmental way in which you phrased option three, I must insist 
on option 4:

4) Keep the Java version in development.  Possibly add effort to optimize 
the C version, and start a C xalan effort.  Pure Java versions of code are 
convenient for application development, deployment and 
testing.  Development of a pure Java version is needed to make 
xalan/xerces/etc attractive to that audience, and if such a version does 
not exist, we will lose the Java programmers working on it.

>The Java oriented people are forgetting several things:
>1) Hotspot is not available on all platforms
>2) There is a  group of C based users who can't call the Java code no 
>matter how fast or good it is.

The C oriented people are forgetting several things as well:
1) There is a C development group working on xerces.  If the result of 
their code is not fast enough for your needs, then try to convince people 
to optimize that version.
2) If there is interest in a C version of xalan, etc, then start such a 
project.  Given good results, and a set of JNI bindings, you might well 
attract a lot of interest.
3) Complain to vendors if their Java implementation sucks dirt.  I know 
that the IBM jdk for Linux is easily twice as fast as the Sun version.

I have not yet seen a compelling reason to halt development on the Java 
version, though you make a very good case for optimizing both the Java and 
the C versions.  You also make a compelling case for starting a xalan-c 
list and effort.

Frankly, I programmed C++ for 7 years, and will not likely do so again in 
the future, so I, for one, would likely lose interest in contributing to 
xerces/xalan were they only in C/C++.  That said, I have done nothing other 
than contribute a bug report thus far.  I suspect, though, that many of the 
people who have contributed to it thus far would rather leave than work on 
the C version, so success in your endevour would likely result in a loss of 
people contributing.

Scott
Scott Ellsworth
scott@alodar.com


Re: Java version need? - Summary so far

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 2 Aug 2000, Jon Smirl wrote:

> Replies are falling into three categories:
> 
> 1) Go for it, four other choices are enough
> 2) Since JNI is transparent I won't notice and I don't care
> 3) Java is the one and only true religion, go away heathen
> 
> The Java oriented people are forgetting several things:
> 1) Hotspot is not available on all platforms
> 2) There is a  group of C based users who can't call the Java code no matter
> how fast or good it is.
> 
> What is the target audience for the Xalan/Xerces project?
> 
> 1) Research
> 2) Transforming large documents (books) off-line
> 3) Casual use in low traffic site
> 4) Heavy traffic site with pages begin generated from XSLT
> 5) Handheld computers
> 6) Stand alone apps
> 
> The priorities for these audiences are not the same and often in conflict.
> 
> I'm in category 4.  To satisfy the needs of category 4 XSLT transform times
> need to be under 50ms on common hardware, with under 25ms being better.
> Right now the C version takes around 500ms and the Java version is worse.

I'm in category 4 and I still want a Java version. I'm a cocoon developer.
cocoon is a java servlet. cocoon needs a bsd-licensed 100% pure java XSLT
transformer in order to be easy to install on platform X. speed is good,
but it isn't my primary constraint. a good cache goes a long way towards
ameliorating that anyway.

if you want a c/c++ XSLT transformer, more power to you - the day we have
mod_xslt for apache will be a great day. i'm sure xalan-c could use your
help, but there's no reason to call for the death of xalan-j.

- donald