Usage of java over BSH

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Usage of java over BSH

G.Venkata Phanindra
Hi all.
      I am currently working on Optimization of  load time  for website
running on Ofbiz... i have a doubt by moving the code from bsh to Java class
can we expect improvement in load time... as bsh is a pure interpreted
language where as java is a compiled one ... i have gone thru the
documentation given at
http://beanshell.org/intro.html.<http://beanshell.org/intro.html>

regards,
G.Venkata Phanindra
Mob:: 9849852989
Reply | Threaded
Open this post in threaded view
|

Re: Usage of java over BSH

cjhowe
While there is likely better performance using Java over bsh, you would
likely be better to identify what actions specifically are taking
longer than they should.  Your better targets for optimization are
playing with the cache settings and making sure you're entity queries
are using cached entities whenever possible and using view entities
instead of multiple trips to the database.  In addition possibly
setting up more complex SQL Views in your database and modeling them as
if they were entities, ensuring your database is configured optimally
and looking at where denormalization of your data model may be
beneficial in your usage.  I think you'll find overall most of your
performance hits come from round trips to the database as opposed to
the actual "language" your write your scripts in.

BTW Phani,  I have just completed getting a shopping cart to Google
Checkout, I'd be interested if you had completed any of the other order
fullfillment integrations with Google Checkout.  Thanks!

-Chris
--- "G.Venkata Phanindra" <[hidden email]> wrote:

> Hi all.
>       I am currently working on Optimization of  load time  for
> website
> running on Ofbiz... i have a doubt by moving the code from bsh to
> Java class
> can we expect improvement in load time... as bsh is a pure
> interpreted
> language where as java is a compiled one ... i have gone thru the
> documentation given at
> http://beanshell.org/intro.html.<http://beanshell.org/intro.html>
>
> regards,
> G.Venkata Phanindra
> Mob:: 9849852989
>

Reply | Threaded
Open this post in threaded view
|

Re: Usage of java over BSH

G.Venkata Phanindra
Thanks for your reply ...
         i will definitely get back to your with my status on Google check
out as i have a few issues which needs to be solved.

On 2/7/07, Chris Howe <[hidden email]> wrote:

>
> While there is likely better performance using Java over bsh, you would
> likely be better to identify what actions specifically are taking
> longer than they should.  Your better targets for optimization are
> playing with the cache settings and making sure you're entity queries
> are using cached entities whenever possible and using view entities
> instead of multiple trips to the database.  In addition possibly
> setting up more complex SQL Views in your database and modeling them as
> if they were entities, ensuring your database is configured optimally
> and looking at where denormalization of your data model may be
> beneficial in your usage.  I think you'll find overall most of your
> performance hits come from round trips to the database as opposed to
> the actual "language" your write your scripts in.
>
> BTW Phani,  I have just completed getting a shopping cart to Google
> Checkout, I'd be interested if you had completed any of the other order
> fullfillment integrations with Google Checkout.  Thanks!
>
> -Chris
> --- "G.Venkata Phanindra" <[hidden email]> wrote:
>
> > Hi all.
> >       I am currently working on Optimization of  load time  for
> > website
> > running on Ofbiz... i have a doubt by moving the code from bsh to
> > Java class
> > can we expect improvement in load time... as bsh is a pure
> > interpreted
> > language where as java is a compiled one ... i have gone thru the
> > documentation given at
> > http://beanshell.org/intro.html.<http://beanshell.org/intro.html>
> >
> > regards,
> > G.Venkata Phanindra
> > Mob:: 9849852989
> >
>
>


--
G.Venkata Phanindra
Mob:: 9849852989
Reply | Threaded
Open this post in threaded view
|

Re: Usage of java over BSH

Cameron Smith-6
In reply to this post by G.Venkata Phanindra
Hi.  Do not forget that OFBiz has custom improvements to Beanshell, which basically mean the parsed structure of a script is cached after the first interpretation.    I have not seen any figures for relative performance but it is an obvious one.

For more info start here:
http://issues.apache.org/jira/browse/OFBIZ-528

From experience, I would suggest that moving from bsh to Java would not necessarily help performance that much, compare to other typical bottlenecks. It may also increase your development costs, thus reducing your hardware budget and thus indirectly reducing performance!  I would certainly recommend doing controlled, quantitative tests before embarking on any major initiatives or code refactorings just for performance reasons.

cameron

----- Original Message ----
From: G.Venkata Phanindra <[hidden email]>
To: [hidden email]
Sent: Wednesday, 7 February, 2007 8:56:48 AM
Subject: Usage of java over BSH

Hi all.
      I am currently working on Optimization of  load time  for website
running on Ofbiz... i have a doubt by moving the code from bsh to Java class
can we expect improvement in load time... as bsh is a pure interpreted
language where as java is a compiled one ... i have gone thru the
documentation given at
http://beanshell.org/intro.html.<http://beanshell.org/intro.html>

regards,
G.Venkata Phanindra
Mob:: 9849852989





               
___________________________________________________________
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk