You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by java guru <ja...@yahoo.co.in> on 2001/07/28 17:00:31 UTC

perfomance inprovements to c2

Hi.,
  I am looking into improving the performance of c2
for specific platforms..

Following are the queries i have ... they might be
silly...but any input is highly appreciated...

1. c2 uses the parser and xslt parser developed in
java..

2. Is it possible to use platform specific c++ version
of them wrapped around java may be using jni / some
other stuff.. Like the wrap arounds are used for java
compilers..

3. Shouldnt it improve the performance of c2?(atleast
if we know the target application platform)





=====
Thanks and have great day
srini

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: perfomance inprovements to c2

Posted by java guru <ja...@yahoo.co.in>.
Hi.,
  i am very thankful for the insight provided by
couple of folks..but honestly, like my former buddy
mentioned, lets not start "religious war" here on this
mailing list....

This very definitely gave me some insight to what the
c++/java relation meant..

Thanks guys..
 --- Ross Burton <ro...@mail.com> wrote: > On 28
Jul 2001 17:00:19 +0100, Sergio Carvalho
> wrote:
> > >   I am looking into improving the performance of
> c2
> > > for specific platforms..
> > > 
> > > Following are the queries i have ... they might
> be
> > > silly...but any input is highly appreciated...
> > > 
> > > 1. c2 uses the parser and xslt parser developed
> in
> > > java..
> > > 
> > > 2. Is it possible to use platform specific c++
> version
> > > of them wrapped around java may be using jni /
> some
> > > other stuff.. Like the wrap arounds are used for
> java
> > > compilers..
> > > 
> > > 3. Shouldnt it improve the performance of
> c2?(atleast
> > > if we know the target application platform)
> 
> JNI is not a magic bullet, just because native code
> is being called
> doesn't mean that it will go faster for two reasons:
> 
> 1. JITs like Sun's HotSpot will compile the entire
> XML parser to native
> code within a few minutes of use
> 2. There is substancial overhead with calling JNI
> functions.
> 
> For anyone who doesn't believe that the overhead of
> JNI is that large,
> find a copy of "Java Platform Performance" - a book
> from Sun press.
> Section 9.3.2 is a case study on JNI - specifically
> java.math.  In JDK
> 1.0-1.2 large portions of that library were native
> code written in C,
> but the code was getting very complex.  For JDK 1.3
> the library was
> re-written in Java, and ended up faster - for some
> operations several
> hundred percent faster.
> 
> Of course, feel free to do code this if you want -
> this may be an
> example where JNI is a Good Thing.  But check the
> benchmarks for XML
> parsers first - IIRC Xalan-C is slower than Xalan-J.
>  MSXML however, is
> very fast.
> 
> Ross
> 
> 
>
---------------------------------------------------------------------
> 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:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>  

=====
Thanks and have great day
srini

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: perfomance inprovements to c2

Posted by Ross Burton <ro...@mail.com>.
On 28 Jul 2001 17:00:19 +0100, Sergio Carvalho wrote:
> >   I am looking into improving the performance of c2
> > for specific platforms..
> > 
> > Following are the queries i have ... they might be
> > silly...but any input is highly appreciated...
> > 
> > 1. c2 uses the parser and xslt parser developed in
> > java..
> > 
> > 2. Is it possible to use platform specific c++ version
> > of them wrapped around java may be using jni / some
> > other stuff.. Like the wrap arounds are used for java
> > compilers..
> > 
> > 3. Shouldnt it improve the performance of c2?(atleast
> > if we know the target application platform)

JNI is not a magic bullet, just because native code is being called
doesn't mean that it will go faster for two reasons:

1. JITs like Sun's HotSpot will compile the entire XML parser to native
code within a few minutes of use
2. There is substancial overhead with calling JNI functions.

For anyone who doesn't believe that the overhead of JNI is that large,
find a copy of "Java Platform Performance" - a book from Sun press.
Section 9.3.2 is a case study on JNI - specifically java.math.  In JDK
1.0-1.2 large portions of that library were native code written in C,
but the code was getting very complex.  For JDK 1.3 the library was
re-written in Java, and ended up faster - for some operations several
hundred percent faster.

Of course, feel free to do code this if you want - this may be an
example where JNI is a Good Thing.  But check the benchmarks for XML
parsers first - IIRC Xalan-C is slower than Xalan-J.  MSXML however, is
very fast.

Ross


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: perfomance inprovements to c2

Posted by Sergio Carvalho <se...@acm.org>.
A few months ago there was a religious war here with a spark somewhat like this.

Summarizing what I remember correctly about it:
 a) Most people around here don't believe the speed gains justify the extra work,
    extra complexity and extra portability problems.
 b) If you or anyone do feel otherwise, you are free to start a project to interface 
    cocoon with a native XML library. You'll get help here, but not much enthusiasm.

I'm hoping to stop a Java vs C religious war here...


On Sat, 28 Jul 2001 16:00:31 +0100 (BST), java guru <ja...@yahoo.co.in> wrote:
--
> Hi.,
>   I am looking into improving the performance of c2
> for specific platforms..
> 
> Following are the queries i have ... they might be
> silly...but any input is highly appreciated...
> 
> 1. c2 uses the parser and xslt parser developed in
> java..
> 
> 2. Is it possible to use platform specific c++ version
> of them wrapped around java may be using jni / some
> other stuff.. Like the wrap arounds are used for java
> compilers..
> 
> 3. Shouldnt it improve the performance of c2?(atleast
> if we know the target application platform)
> 
> 
> 
> 
> 
> =====
> Thanks and have great day
> srini
> 
> ____________________________________________________________
> Do You Yahoo!?
> For regular News updates go to http://in.news.yahoo.com
> 
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
> 



--
Sergio Carvalho
---------------
sergio.carvalho@acm.org

If at first you don't succeed, skydiving is not for 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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>