db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: PersistentField implementations, dramatic performance differences
Date Sat, 26 Jun 2004 10:53:52 GMT
Thomas Dudziak wrote:

> There are two problems here, and neither is in the auto proxy impl:
> 
> 1. The test case does not set the tested persistent field impl as the 
> default persistent field impl (for PersistentFieldFactory), so the 
> creation of PersistentField instances for the nested field always uses 
> the direct access impl.
>

oh, forget this issue of the old implementations (nested fields create 
internal used PF).

> 2. You added a new abstract PersistentField base imlementation which is 
> unrelated to the existing one (AbstractPersistentField),

the new PF implementations don't use internal created PF instances for 
resolving nested fields, so there is no need to use 
AbstractPersistentField. I want to replace this class with 
PersistentFieldBase when we completely move to new implementations.

> and which is 
> set as the base class of the introspector impl. This lets the test fail 
> because the auto proxy impl requires AbstractPersistentField impls (for 
> doGet/doSet) leasing to a class cast exception in the 
> PersistenceFieldAutoProxyImpl#getFieldImpl method that determines the 
> actual persistent field impl to use.
> 
> I fixed the first issue in the test case, but since I don't know why you 
> added the new base type, I didn't touch the second one. Can you have a 
> look ?
> 

I tried the test with the old PFIntro... and all seems to pass. So I 
rollback changes and introduce a new class PFIntrospectorImplNew.

All we need now is a new PFAutoProxyImplNew class ;-)
Sorry for the hassle.

All test pass now. The performance looks like:

=========================================
Field performance, set/get 30000 times a field
----------------------------------------
PersistentFieldDirectAccessImpl: getter=15 setter=16
PersistentFieldDirectAccessImplNew: getter=0 setter=0
PersistentFieldIntrospectorImpl: getter=15 setter=0
PersistentFieldIntrospectorImplNew: getter=0 setter=0
PersistentFieldPrivilegedImpl: getter=500 setter=484
PersistentFieldPrivilegedImplNew: getter=500 setter=469
PersistentFieldAutoProxyImpl: getter=0 setter=0
----------------------------------------
PersistentFieldDirectAccessImpl: getter=0 setter=0
PersistentFieldDirectAccessImplNew: getter=0 setter=0
PersistentFieldIntrospectorImpl: getter=0 setter=0
PersistentFieldIntrospectorImplNew: getter=0 setter=0
PersistentFieldPrivilegedImpl: getter=515 setter=469
PersistentFieldPrivilegedImplNew: getter=500 setter=469
PersistentFieldAutoProxyImpl: getter=0 setter=0
----------------------------------------
.
=========================================
Nested Field performance, set/get 30000 times a nested field
----------------------------------------
PersistentFieldDirectAccessImpl: nestedGetter=5734 nestedSetter=5782
PersistentFieldDirectAccessImplNew: nestedGetter=78 nestedSetter=157
PersistentFieldIntrospectorImpl: nestedGetter=5734 nestedSetter=5749
PersistentFieldIntrospectorImplNew: nestedGetter=79 nestedSetter=156
PersistentFieldPrivilegedImpl: nestedGetter=5735 nestedSetter=5750
PersistentFieldPrivilegedImplNew: nestedGetter=1437 nestedSetter=2515
PersistentFieldAutoProxyImpl: nestedGetter=5686 nestedSetter=5765
----------------------------------------
PersistentFieldDirectAccessImpl: nestedGetter=5921 nestedSetter=5797
PersistentFieldDirectAccessImplNew: nestedGetter=78 nestedSetter=187
PersistentFieldIntrospectorImpl: nestedGetter=5798 nestedSetter=5812
PersistentFieldIntrospectorImplNew: nestedGetter=78 nestedSetter=157
PersistentFieldPrivilegedImpl: nestedGetter=5904 nestedSetter=5876
PersistentFieldPrivilegedImplNew: nestedGetter=1515 nestedSetter=2531
PersistentFieldAutoProxyImpl: nestedGetter=5844 nestedSetter=5797
----------------------------------------

Time: 141,532

OK (2 tests)


Armin

> Tom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message