Thanks, Darius ... I'll take a look at the core fix for the daemon user.  I
should have a snapshot that is for "normal" ORU^R01 messages, not using the
specialized lab processor, that can show you the saveEncounter() slow down;
hopefully I can provide that for you sometime early tomorrow.

Jeremy Keiper
OpenMRS Core Developer
AMPATH / IU-Kenya Support


On Wed, Sep 7, 2011 at 6:38 PM, Darius Jazayeri <[email protected]> wrote:

> Hi Jeremy, (copying the dev list)
>
> I looked at the snapshot. It's not as helpful as they often are.
>
> Some things I noticed:
>
> HibernateContextDAO.getUserByUuid(String) is taking a massive amount of
> time. The underlying issue is that @Authorized checks lead to a call to
> Context.getAuthenticatedUser(). But when you're in a Daemon thread, that
> causes a database query (via contextDAO.getUserByUuid). *I believe there's
> a trivial fix to core that will save 10-15% of your CPU time.* In the
> beginning of AuthorizationAdvice.before, add something like:
>
> if (Daemon.isDaemonThread())
>     return;
>
>
> Your LabORUR01Handler.processLabORU_R01 method is spending 60% of its time
> doing saveObs(Obs, String). Presumably if batches of lab results were saved
> in encounters, that'd be faster. But that's a significant change for you.
>
> -Darius
>

_________________________________________

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]

Reply via email to