History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1424
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Christopher J. Holdorph
Reporter: Andrew Petro
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

allow multithreaded rendering of portlets

Created: 08/Feb/06 02:45 PM   Updated: 10/Sep/07 11:12 AM
Component/s: Portlet Container
Affects Version/s: None
Fix Version/s: 2.5.3 RC2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Generic Relation
 
This issue relates to:
UPD-40 JavaDoc warnings and errors Minor Open


 Description  « Hide
Currently CPortletAdapter getMarkup() (quoted here from 2-5-patches) is synchronized. Since the 2-5-patches CPortletAdapter is an IMultithreaded, it is a singleton. Therefore, getting portlet markup is globally synchronized. This means that the heavy lifting of portlet rendering is being undertaken under a single thread model -- only one uPortal thread can be rendering a portlet at any given time. This should have serious negative performance consequences for uPortal deployers making heavy use of JSR-168s -- exacerbated by UP-1423 (portlet "instance" provisioning synchronizes on this same lock, so no portlet instance can be provisioned concurrently with any portlet's rendering).

/**
     * This is where we do the real work of getting the markup.
     * This is called from both renderXML() and renderCharacters().
     * @param uid a unique ID used to identify the state of the channel
     * @return markup representing channel content
     */
    protected synchronized String getMarkup(String uid) throws PortalException {


 All   Comments   Work Log   Change History      Sort Order:
Andrew Petro [10/Feb/06 09:58 AM]
Removing the synchronized keyword didn't break anything under casual investigation. This change will be locally applied @ UW with QA and load testing – I expect it will work great there and we'll be able to move on this issue in uPortal. Also, Brad reports on-list that he's looked some at what getMarkup is doing and believes its use of ThreadLocal makes it threasafe.

Brad Johnson [01/Jun/06 11:37 AM]
Hey Andrew, did you all run into any problems removing "synchronized" from CPortletAdapter.getMarkup() at UW?

Christopher J. Holdorph [12/Jul/06 06:51 PM]
removed synchronized keyword from CPortletAdapter getMarkup() method. UW is running this change in production and has seen no problems so far, and they are exclusively using portlets. Unicon has also placed this change at another customer site and seen it resolve problems that customer was encountering. It has not shown any negative side effects.

This change is not needed in the Trunk, beause the trunk has already been refactored away from IMultithreaded.