commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Schlegel" <>
Subject [JXPath] Performance penalty with DynamicPropertyHandler.getPropertyNames(Object)
Date Thu, 17 Feb 2005 20:51:47 GMT
I have written an Implementation of the DynamicPropertyHandler interface to
allow our ObjectModel (kind of an inmemory Object store 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
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.

Oh, I have to mention, that we use JXPath in lenient mode. This could be the
reason why getPropertyNames(Object) is not useful in our case. If so, JXPath
should be changed to not use getPropertyNames(Object) in lenient mode per


Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message