portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weaver, Scott" <Swea...@rippe.com>
Subject [PATCH] Optimized PortletInstance creation
Date Tue, 01 Oct 2002 19:32:27 GMT
This patch minimizes object creation of PortletInstances by doing per-request caching on PortletInstance
within the current HttpRequest.  PortletInstance's are keyed as "portlet_instance:<portlet
id>".  I was prompted to do this not only because of the bug stated below, but because
I counted, via a debugger, the same PortletInstance being instantiated no less than 7 seven
times if not more (got tired of counting ;)!  Now it's down to once.

Bug fixed:
This also fixed a bug I was experiencing when minimizing/restoring portlets.  
After either of these actions I was required to refresh the screen to see the expected effect,
basically causing the portlet to re-read its state from the profile.  I attributed this to
too many instances of the same portlet instances floating around and being out of sync. The
attached patch has also fixed this.


View raw message