You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Mkhitaryan, Aram" <Ar...@lycos-europe.com> on 2006/07/25 06:47:35 UTC

Enhancement in IBATIS

Hi,

 

I'm starting a new project where I want to use IBATIS.

But I have written some tests where I found out some problems:

1.      When my parameter class or result class is JavaBean (bean object with getters and setters) it is much slower than a simple bean object with public attributes.

2.      When I’m switching on enhancement, nothing happens with performance.

3.      When I’m comparing simple/plain jdbc manually coded select or insert and IBATIS on my computer (Win XP, db and application are on the same computer) IBATIS is faster (~100ms), but when my application is on my computer and db server is on remote computer (linux, Debian), IBATIS is slower 5 times (sometimes even more). My db is MySql 5.0.

 

Does somebody know how it is possible to configure IBATIS to make it faster than its default configuration?

And does somebody know why IBATIS is so slow when it is working with remote computer (linux)?

 

Please, help to solve these problems, it is too important.

 

Thank you in advance,

Aram


Re: Enhancement in IBATIS

Posted by Larry Meadors <lm...@apache.org>.
I am not sure I can take another "Gee, iBATIS is slow, can you make it
faster" thread, but here goes...

On 7/24/06, Mkhitaryan, Aram <Ar...@lycos-europe.com> wrote:
> I'm starting a new project where I want to use IBATIS.

Welcome!

> But I have written some tests where I found out some problems:
>
> 1.      When my parameter class or result class is JavaBean (bean object
> with getters and setters) it is much slower than a simple bean object with
> public attributes.

Please explain that more...AFAIK, iBATIS (java) will not use public
fields, only properties exposed with get/set methods.

> 2.      When I'm switching on enhancement, nothing happens with performance.

Nope, it would not affect this.

> 3.      When I'm comparing simple/plain jdbc manually coded select or insert
> and IBATIS on my computer (Win XP, db and application are on the same
> computer) IBATIS is faster (~100ms), but when my application is on my
> computer and db server is on remote computer (linux, Debian), IBATIS is
> slower 5 times (sometimes even more). My db is MySql 5.0.

I'd guess it has to do with getting the connection, preparing the
statement, executing the statement, or fetching the results - i.e.,
the JDBC layer.

> Does somebody know how it is possible to configure IBATIS to make it faster
> than its default configuration?

Find the bottlenecks and eliminate them. Without knowing what
environmental factors impact performance, that is the best I can tell
you.

> And does somebody know why IBATIS is so slow when it is working with remote
> computer (linux)?

As above, so below. ;-)

This has been said before, but it is worth repeating:

Try iBATIS if you want to. If it is fast enough as it is, then great: use it.

If it is not, try to find out why, and see if you can make it work faster.

If you can make it fast enough, great.

If you can't, then don't use it.

I can say that in my experience, it is without a doubt the best
balance of simplicty and performance of all of the persistence tools
out there. Period.

Larry

Re: Enhancement in IBATIS

Posted by Clinton Begin <cl...@gmail.com>.
Hi Aram,

If you want us to be able to respond in any way that is useful to you, you
must post your source code.

What I can tell you, is that in the 4 years iBATIS has existed, nobody has
actually shown that iBATIS is slower than JDBC in any significant way
(beyond what is expected from the overhead of reflection etc -- which is
truly not significant).

Otherwise, you can read about this person's experience:

http://www.mail-archive.com/user-java@ibatis.apache.org/msg04760.html

Cheers,
Clinton

On 7/24/06, Mkhitaryan, Aram <Ar...@lycos-europe.com> wrote:
>
>  Hi,
>
>
>
> I'm starting a new project where I want to use IBATIS.
>
> But I have written some tests where I found out some problems:
>
> 1.      When my parameter class or result class is JavaBean (bean object
> with getters and setters) it is much slower than a simple bean object with
> public attributes.
>
> 2.      When I'm switching on enhancement, nothing happens with
> performance.
>
> 3.      When I'm comparing simple/plain jdbc manually coded select or
> insert and IBATIS on my computer (Win XP, db and application are on the same
> computer) IBATIS is faster (~100ms), but when my application is on my
> computer and db server is on remote computer (linux, Debian), IBATIS is
> slower 5 times (sometimes even more). My db is MySql 5.0.
>
>
>
> Does somebody know how it is possible to configure IBATIS to make it
> faster than its default configuration?
>
> And does somebody know why IBATIS is so slow when it is working with
> remote computer (linux)?
>
>
>
> Please, help to solve these problems, it is too important.
>
>
>
> Thank you in advance,
>
> Aram
>