portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: PSML Browser Portlet performance issue
Date Thu, 17 Apr 2003 19:07:51 GMT

On Thursday, April 17, 2003, at 08:30  AM, Fabio Latrofa wrote:

> I noticed a performance issue with PSML Browser Portlet working on DB: 
> the
> buildNormalContext method is very slow the first time and also after a
> doRefresh action.

I haven't really noticed it being that slow against the db here (Oracle)
How slow is slow?

> I think the problem is in the query(QueryLocator) method of the
> DatabasePsmlManagerService class but, to be accurate, the 
> getProfiles(List)
> method is also involved. The problem is that, for each profile stored 
> in the
> PSML registry, there is a single query executed on the user (or role or
> group) table.
>
> Example
>  Four profiles stored:
>  - User anon, Media Type html
>  - User anon, Media Type html, language en
>  - User admin, Media Type html
>  - User admin, Media Type html, language en
>
>  Five queries executed:
>  - SELECT JETSPEED_USER_PROFILE.PSML_ID,...FROM JETSPEED_USER_PROFILE 
> ORDER
> BY UPPER(JETSPEED_USER_PROFILE.USER_NAME) ASC,...
>  - SELECT TURBINE_USER.USER_ID, ... FROM TURBINE_USER WHERE
> TURBINE_USER.LOGIN_NAME='admin'
>  - SELECT TURBINE_USER.USER_ID, ... FROM TURBINE_USER WHERE
> TURBINE_USER.LOGIN_NAME='admin'
>  - SELECT TURBINE_USER.USER_ID, ... FROM TURBINE_USER WHERE
> TURBINE_USER.LOGIN_NAME='anon'
>  - SELECT TURBINE_USER.USER_ID, ... FROM TURBINE_USER WHERE
> TURBINE_USER.LOGIN_NAME='anon'
>

I thought there should be 3 queries against: JETSPEED_USER_PROFILE, 
JETSPEED_GROUP_PROFILE, and JETSPEED_ROLE_PROFILE
One optimization that I've been considering is to combine these 3 
tables.

Are you sure that the queries against TURBINE_USER are generated from 
the DatabasePsmlManagerService?

>
> I think there could be at least two different solutions but I'm not 
> sure
> about side effects.
>
> First solution: to change the query(QueryLocator) method of
> DatabasePsmlManagerService and extract profiles with a single db 
> access:
> JETSPEED_USER_PROFILE and TURBINE_USER might be joined but there will 
> be
> problems with, for example, an LDAP user authentication.

Not sure where we are hitting the TURBINE_USER table directly.
Look at the DatabasePsmlManagerService.query method.
It makes three calls to the selectedOrdered method on the 
Jetspeed[user/role/group]ProfilerPeer class, which doesn't select from 
TURBINE_USER

>
> Second solution: to change the query(QueryLocator) method of
> DatabasePsmlManagerService and extract profiles with lightweight 
> version of
> JetspeedUser object: an instance containing only the user name. This 
> one
> seems better to me but I'm not sure about possible drawbacks.
>

Or at least lazy load the BLOB until needed.

> I would like to receive your opinion and suggestions about the problem 
> and
> the possible solutions. Thanks.
>
> Regards,
>
> Fabio Latrofa
> SIVA S.p.A
> Mail: flatrofa@sivaspa.com
>
>
> Questa e-mail e' stata verificata dal sistema di antivirus della Siva 
> S.P.A.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>
>

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message