[Building Sakai] org.sakaiproject.util.Web.escapeHtml(String, boolean)

Stephen Marquard stephen.marquard at uct.ac.za
Mon May 10 09:20:01 PDT 2010


You can disable the privacy checks for presence with:

overrideViewable at org.sakaiproject.component.privacy.PrivacyManagerImpl=true

in sakai.properties (if you're not using the privacy manager).

Cheers
Stephen 
 
>>> Matthew Buckett <matthew.buckett at oucs.ox.ac.uk> 5/10/2010 5:55 PM >>> 
It seems that org.sakaiproject.util.Web.escapeHtml(String, boolean)
used to lazily allocate the StringBuilder, so that if no escaping was
needed it would just return the same string object. But now it's been
hardcoded to always preallocate the StringBuilder.

			StringBuilder buf = (false) ? null : new StringBuilder();

Does anyone know why this change was made? It seems like it's from
before the K1 days.

This has cropped up as I was looking at the performance of presence
and it makes a reasonable number of calls to this method (eg escape
display names) which generates  quite a few objects that need to be
GCed.

The real performance issue with presence is the cost of the two DB
calls (all sessions in the current site and privacy check to see which
users can be displayed).

-- 
  Matthew Buckett
  VLE Developer, LTG, Oxford University Computing Services
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



 
______________________________________________________________________________________________ 

UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 4500. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.

_____________________________________________________________________________________________________
 


More information about the sakai-dev mailing list