openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simtec <sim...@datacomm.ch>
Subject Performance of field access
Date Fri, 23 May 2008 10:06:23 GMT
Hi!

I have a simple Derby table with many thousands of points. I have to
iterate over these points many times to compute distance from x and y
coordinates. 

@Entity
class Point
{
  Double x;
  Double y;
  getter/setter ...
}

      * OpenJPA 1.0.2 
      * Derby 10.4.1.3 (Embedded) 
      * Non-EE use

I realised that field access (e.g. point.x) of detached objects is much
faster than field access of attached objects (by a factor of 4). Also
access is much faster if I do not enhance the point class. Why is this?
Does OpenJPA check the database on every field access if the object is
attached? What can I do to improve performance of attached objects?

Thanks for any help, Valentin




Mime
View raw message