db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John M <wu...@mailandnews.com>
Subject [PATCH] performance on PersistenceBrokerImpl, SqlHelper, ClassDescriptor
Date Mon, 30 Jun 2003 15:17:32 GMT
Oops!  Bad thing to miss!  Anyway, the attached patches are the zipped 
versions of what I had earlier, but with a change to the PB patch to call 
getObjectByIdentity if found.  See if this is better.

John Marshall
Connectria

>hi john,
>
>your PersistenceBroker patch does NOT refresh releationships as it
>should be done in getObjectByIdentity.
>
>jakob
>
>John M wrote:
>
>>I have done some analysis with Sun's JFluid while
>>trying to optimize parts of my application which needs
>>to load a lot of data at once for processing.  I'm
>>using rc4 from cvs with just the PB interface.
>>Anyway, I have discovered a couple of places where a
>>quick fix offered some substantial performance gains.
>>
>>First, I noticed that in
>>ClassDescriptorgetDynamicProxyClass() the proxy class
>>interface list was being created each time.  As far as
.>I know this stuff is static, so I cached the list as a
>>member variable.  The patch is large below but is
>>really just wrapping the existing code in an if like
>>the other methods that cache something.
>>
>>Second, in PersistenceBrokerImpl.getReferencedObject,
>>I added a check for the object in the cache.  I had a
>>situation where the object was already in the cache,
>>but instead of loading the object directly a proxy was
>>created which later resolved to the cached object,
>>which wasted quite a bit of time.
>>
>>Lastly, I reordered the switch on column type in
>>SqlHelper, putting common field types like INTEGER and
>>VARCHAR first and less common types at the end.  I
>>didn't measure this change but it seems that bouncing
>>through as few case checks as possible would be best.
>>I didn't attach the patch for this, but I can make it
>>available if desired.
>>
>>I inlined the patches; let me know if I should repost.
>>These changes work fine for me but OJB is way too
>>large for me to know about everything that is going
>>on, and I don't use many of the features, so let me
>>know if there are consequences to the changes
>>suggested.
>>
>>John Marshall
>>Connectria

Mime
View raw message