So I took the plunge and got the latest from HEAD, built 1.1, and
integrated it into your application that exercises PB pretty hard. After
figuring out some configuration issues (more later on), I was up and
running, and I have say it has speed up dramatically.
 
I am not sure exactly why yet, but what I do know is that we have some
pages that have very heavy-graphs that we walk. At the minimum
(displaying one 'sparse' object), I am seeing at least a 50% drop in
time spent inside OJB. On some pages where we will have ~800 root
objects displayed that we also walk part of their graphs as well (really
should be a ReportQuery, but is not), I am seeing a 60-70% drop  on the
first hit of the page, and up to 80% drop on subsequent hits!! (For
instance, one page that was on average about ~15s is now coming back in
2.5s).
 
I am extremely impressed.
 
I am going to assume that the most significant contributing factors are
1) The change of configuration to the IOC model, and 2) reworking of the
Cache implementations.
 
The changes are so dramatic that I am contemplating introducing this
build into our production environment - any strong reason why I
shouldn't at this point if I am only using PB, and my interaction with
OJB is constrained to one wrapper class?
 
That does bring up the one real question I do have: There was a new
broker.OJB object that was introduced. All the examples talked about
doing ojb.lookupBroker() to get a PB instance. We use to do
PersistenceBrokerFactory.defaultPersistenceBroker(), but I am not sure
if that is considered the best way anymore. I tried moving to using
ojb.lookupBroker(), but unless I kept a static reference to the OJB
object, every time I would create a new broker, it would think that it
needed to do all the initialization work, and would also give me a fresh
cache. 
 
Now as I am typing this, I realize that with the introduction of IOC,
that my wrapper class should really utilize the Pico container and get
it's instance of OJB from that.
 
Anyways, great work! I would love to hear hypothesis's as to why the
huge performance increase!
 
-Andrew
 
 

Reply via email to