-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: performance compared to Weblogic - question on find all.
PostPosted: Sun Mar 21, 2004 12:56 pm 
Newbie

Joined: Sun Mar 21, 2004 12:07 pm
Posts: 1
We have been using Weblogic EJB's in a clustered environment and have done some simple benchmarks comparing that to a Hibernate/Swarmcache implementation.

So far I have been impressed with Hibernate performance for most of the tests - it outperforms the WL implementation except for finders that return multiple rows from the database - for example find all records in a 5000 row table is at least 30% slower than Weblogic.

It would be great to beat Weblogic in all tests. We have not profiled Hibernate to find where it is spending its time - but I wonder if anyone has any ideas for the slowdown - is this a known issue?

We are using version 2.1
The mapping is very simple - there are no relations - each table is separate. Here is the mapping:

Code:
<class name="APIRW" table="API" discriminator-value="0">
  <cache usage="nonstrict-read-write" />
  <id name = "apiId" column="id" unsaved-value="null">
    <generator class="net.sf.hibernate.id.TableHiLoGenerator">
      <param name="table">id_gen</param>
      <param name="column">entity_id</param>
    </generator>
  </id>
  <property name="apiName" column="api_name" type="string" />
  <property name="description" column="description" type="string" />
  <property name="isGenerallyAccessible" column="is_generally_accessible" type="boolean" />
  <property name="authorizeDefaultRole" column="authorize_default_role" type="boolean" />
  <property name="creationTime" column="creation_time" type="timestamp" />
  <property name="lastUpdateTime" column="last_update_time" type="timestamp" />
  <property name="whoModified" column="who_modified" type="string" />
</class>


Here is the relevant block of code

Code:
public List findAllObjects() throws PersistenceException {
    List objects = new ArrayList();
    Session session = null;
    try {
        session = sessionFactory.openSession();
        objects = session.find("from s in class " + className);
    } catch (HibernateException e) {
        throw new PersistenceException(e);
    } finally {
        if ( null != session ) {
            try {
                session.close();
            } catch (HibernateException e1){
                throw new PersistenceException(e1);
            }
        }
    }
    return objects;
}

_________________
-barry


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 21, 2004 3:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
how about trying comparing the actual sql used in the two scenarios ?

That will probably give you a hint about what could be the cause - and even the solution ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 22, 2004 8:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I would assume that this is the result of WL caching the query result. This is possible in hibernate but I don't think Swarm is capable in this area.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.