commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Schlegel" <markus.schle...@gmx.ch>
Subject [JXPath] Performance penalty with DynamicPropertyHandler.getPropertyNames(Object)
Date Fri, 21 Jan 2005 08:55:50 GMT
I have written an Implementation of the DynamicPropertyHandler interface to
allow our ObjectModel (kind of an in-memory Objectstore based on a
Metamodel) to be accessible with JXPath. As so I have implemented the Method
"getPropertyNames(Object o):String[]" to return all properties accessible
under the given Object "o". The size of the returned array is usually around
250.
With searches in small ObjectModels (up to 2000 Objects) this worked ok. But
with larger Models (30'000 Objects) we encountered poorest performance
(seems to be a non linear algorithm). After looking at it with OptimizeIt,
we changed the getPropertyNames(Object o):String[] method to return an empty
array always. With this change it works with linear performance.
My Question: What is this DynamicPropertyHandler.getPropertyNames(Object)
for? I mean it works without it, and with it, it shows poor performance.
Do we have any disadvantages with returning an empty array always?
Maybe you should take this into the Documentation/UsersGuide. It would have
saved us a lot of time.

Thanks 
Markus

-- 
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message