Jasig/uPortal — pull request #239 by jameswennmacher (2014-02-26 01:40:22+00:00)
Title: UP-3940 Skin applies dynamically based on portlet preferences

Please review for suggestions on approach and simplicity. LESS compilation phase takes 5 - 10 seconds and on a highly parallel multi-tenant environment I wanted to insure:
1) thread safety
2) allow multiple CSS compilations to occur simultaneously for different tenants
3) minimal serial execution; e.g. if a new uPortal war is deployed so no custom skin CSS files exist and 10 tenants hit uPortal at around the same time, I didn't want the last one to have to wait 10 x 10 seconds for their CSS file to be built
4) currently the render method is invoked on every page render (portlet render caching doesn't appear to get cleared in config mode so don't currently use portlet render caching - see UP-3986), so I want to insure render is as efficient as reasonable with minimal trips to disk or external systems.