Display of OSP portfolios is too slow. Every time a page is rendered a fairly complex XML data structure has to be built, including all the data associated with the portfolio. Doing this takes about 7 sec on our production system. That's OK for the first page. But most of our portfolios have several pages, and it's painful to have a long wait going between pages. The obvious solution is to cache the results long enough that when looking around in the portfolio you use the cached copy.
I'm using 5 min. When the user changes data, the portfolio is supposed to reflect the change. So a long cache time would be a bad idea. 5 min should be long enough to get the biggest benefit. GIven our portfolios I'm guessing that this will reduce the number of database accesses by a factor of 10.
The attached diff has a few unnecessary but harmless changes.