portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabio Latrofa" <flatr...@sivaspa.com>
Subject PSML Browser Portlet performance issue
Date Thu, 17 Apr 2003 15:30:56 GMT
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 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 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.

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.

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


Mime
View raw message