Server Processing and Visibility

R

RMD

I have a portal application that uses UserControls as "portlets" inside the
portal. One feature of the portal is the ability to maximize and minimize
portlets, just like you would applications in windows. So far, so good.

The problem is this. When a portlet is minimize, or when it is "behind"
another maximized portlet, there is still quite a bit of server side
processing going on. In order to preserve viewstate for the hidden/minimized
portlets, I only set their visible property to false instead of removing
them from the page entirely. This works great, except that it can result in
a bad user experience.

Say I have 20 portlets on a page, and I maximize one of these portlets. As
far as the server is concerned, there are still 20 usercontrols to be
processed for that page (so it's still just as slow as before), except now
the HTML rendered is a bit different. (ie, only the maximized portlet is
rendered.) If that portlet calculated pie to the billionth decimal place
every time it was shown, it would do that this time as well, even though
those results will always be ignored (never rendered.)

What I would like to do is this: If I detect that a portlet won't be
visible, instead of loading the full fledged UserControl, I load a different
control that simply preserves the viewstate of the previous UserControl.
When I detect that the portlet is going to be visible again (like when it is
restored from a minimized state, or when the other maximized portlet is
restored to a normal state), I switch back to the UserControl.

Is there anyway to achieve what I want?

Thanks,
RMD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top