So that would mean that only method calls from tcl to java are slow?
I changed a program from invoking a bat-file running tcl-code from java to
creating a java object from the tcl code and it seems much slower, tcl and
java then communicates with a socket in both cases(java invoke tcl, tcl
invoke java).
Klara
----- Original Message -----
From: "D. J. Hagberg" <dha...@mi...>
To: <tcl...@li...>
Sent: Thursday, January 03, 2002 5:06 PM
Subject: Re: [tcljava-user] Tclblend performance
> On Thu, 3 Jan 2002, Klara Ward wrote:
> > Is running java through tclblend slower that pure java, and if so, how
much?
>
> The tclblend <-> java connection is done through reflection and JNI and
> thus has the overhead of those API's. I've heard figures like a method
> call through reflection is 10-20x slower than a normal Java method call.
>
> The way to work around this problem, then, is to reduce the number of
> calls across the Tcl/Java interface -- in other words call a fairly
> coarse-grained Java method that does a lot of work rather than making lots
> of little method calls.
>
> Of course, this is easily measurable -- just write a Tcl script that times
> a couple hundred thousand method calls to a Java object, then write a
> little Java program that does the same, and compare the times.
>
> -=- D. J.
>
>
>
> _______________________________________________
> tcljava-user mailing list
> tcl...@li...
> https://lists.sourceforge.net/lists/listinfo/tcljava-user
>
|