Hi Steve, You should get some instant speedup if you call TokenService.getRule instead of LogicService.getRule. (The latter delegates to the former, and pays the AOP overhead twice.) Is the 2 seconds in actual SQL, or is it part of AOP overhead?
Rules are actually cached by token, it's just that we're fetching the TokenConfiguration *before* checking the cache. I don't see any reason we can't check the cache first. (Peeking at the code it seems like there would be no side-effects of doing this.) Can you try this out and create a ticket/patch for it? -Darius On Friday, October 7, 2011, McKee, Steven Jay wrote: > Darius,**** > > ** ** > > We’ve been doing some performance testing for CHICA getting ready for our > production install of OpenMRS 1.7, and we’ve noticed some slow performance > in retrieving token registrations. We run a high volume of rules throughout > the day, so we’re calling the getRule(String) method quite often. Each time > this is called, it makes a request to the database for the TokenRegistration > object. Do you think it’s possible that we could cache the objects so we > don’t have to constantly hit the database? **** > > ** ** > > It takes about 8-10 seconds to produce one of our forms, and about 2 > seconds of that time is spent retrieving the token registrations.**** > > ** ** > > Thanks,**** > > ** ** > > Steve McKee**** > > Children’s Health Services Research**** > > Indiana University School of Medicine**** > > Phone: 317-278-9660**** > > Email: [email protected] <javascript:_e({}, 'cvml', '[email protected]');> > **** > > ** ** > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

