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