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: [OJB 1.1] m:n performance, insert order changes
Date Thu, 16 Sep 2004 18:59:02 GMT
Jakob Braeuchi wrote:

> hi armin,
> 
> the reordering of the method invocation does the trick (very nice :) ). 
> i do not see the GenericObject in PB#storeAndLinkMtoN.

the GenericObject was used in MtoNBroker class.

> i ran the testcases several times and they always pass, so imo you could 
> apply the fixed PB#storeAndLinkMtoN to 1.0.1 as well.
> 

ok, I will do so.

regards,
Armin


> jakob
> 
> Armin Waibel schrieb:
> 
>> Jakob Braeuchi wrote:
>>
>>> hi armin,
>>>
>>> could you please explain how achieved this performance gain ?
>>>
>>
>> I only change the order of method invocation in method 
>> PB#storeAndLinkMtoN(...) and introduce a new helper object 
>> (GenericObject, not sure if this object can replace the Key object or 
>> the Key object could replace GenericObject in this case) in MtoNBroker 
>> class which buffer all indirection table objects till tx-commit/rollback.
>>
>> Armin
>>
>>> jakob
>>>
>>> Armin Waibel schrieb:
>>>
>>>> Did someone have a look at this?
>>>> I want to know if my changes are valid (any side-effects), because I 
>>>> want to make the changes of the m:n insert order in 1.0.x branch too.
>>>> 6 times better performance is a good argument ;-)
>>>>
>>>> regards,
>>>> Armin
>>>>
>>>> Armin Waibel wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> while implement the new batch handling I stumble across a performance
>>>>> issue of the m:n insert operation with auto-update setting to
>>>>> 'object/true'. If I do a manually insert using the "link" methods the
>>>>> performance is ok.
>>>>> But when I try to insert an m:n relation (auto-update=object) with 
>>>>> 3000
>>>>> objects (one movie object with 2000 actors and one actor has 1000 
>>>>> movies
>>>>> referenced back) it takes endless 55000 ms!! (Manually 7079 ms) 
>>>>> (maxDB +
>>>>> OJB on same single cpu machine).
>>>>>
>>>>> So I start to experience with object n-side insert order in method
>>>>> PB#storeAndLinkMtoN.
>>>>> After many trail and error there seems to be a valid solution to
>>>>> increase insert performance. With the new method version it takes 8437
>>>>> ms to insert the 3000 objects (Manually 7094, same as before). So the
>>>>> new version is more than *6 times faster* as the old version. The
>>>>> test-suite tests pass too.
>>>>>
>>>>> Please check the new code in PB#storeAndLinkMtoN(...) and run your own
>>>>> tests against this new version to verify my changes.
>>>>>
>>>>> Should we use the new version in 1.0.x release branch too?
>>>>>
>>>>> You can do the performance test by your own using M2NTest from test 
>>>>> suite.
>>>>>
>>>>> first test use automatic m:n handling (auto-update=object)
>>>>> [M2NTest#testMassStoreUpdateAutomatic]
>>>>>
>>>>> second test set auto-update=none and use link methods
>>>>> [M2NTest#testMassStoreUpdateLinking]
>>>>>
>>>>> With new batch handling enabled it is possible to increase performance
>>>>> to 5469 ms for the 3000 object inserts (manually 4609). 
>>>>> Additionally 30%
>>>>> performance increase.
>>>>>
>>>>> regards,
>>>>> Armin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
> 
> ---------------------------------------------------------------------
> 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