Question
Our TWiki has gotten verrrrry popular. The nature of our business is such that there are hundreds of different groups around the world. At this point we have ~200 webs and 1800+ users, each increasing daily.
The problem is that the weblist is taking several seconds to render, adding those seconds to every page view. I'd like to defer the web list being rendered until the user clicks a link to view it.
I have the logistics worked out for the most part:
- TWiki.WebLeftBarWebsList contains an HTML form with a hidden input that passes an HTML parameter back to itself.
- The same topic has an
INCLUDE variable that takes the URLPARAM as the topic to be included. The URLPARAM defaults to an empty page if not set.
- The
WEBLIST itself lives on the page that is included via the URLPARAM
This works pretty well and the time savings is pretty decent.
The problem is that when the "Show Web List" link is clicked, it redirects to the TWiki.WebLeftBarWebsList topic. I replaced the
WEB and
TOPIC variable with
INCLUDINGWEB and
INCLUDINGTOPIC which at least kept me in the original web, but redirected to the Web.WebLeftBar topic.
Ultimately what I'd like to see is that the topic the user is viewing gets refreshed with an expanded web list. My final attempt was to defer the rendering of
INCLUDINGTOPIC by inserting a
NOP variable in the middle, but that resulted in
INCLUDINGTOPIC itself being shown rather than the rendered value.
Any thoughts on how I might delay the rendering of
INCLUDINGTOPIC or another way to achieve similar functionality? I'm trying to avoid having to edit every web's WebLeftBar
Environment
--
MatthewCardozo - 20 Aug 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
>
redirected to the Web.WebLeftBar topic.
Then I think you want to use
BASETOPIC instead of
INCLUDINGTOPIC.
If that's correct, then just to be safe you might want to use
BASEWEB instead of
INCLUDINGWEB as well, even though it seems to be working for you (for now?).
>
Any thoughts on how I might delay the rendering of INCLUDINGTOPIC
That might be harder. You
could make it into a separate and subsequent HTTP request by putting it in a borderless
iframe (and use a skin to hide the left bar & top bar inside the iframe). An advantage to that is that the whole page wouldn't have to be reloaded, only the web list. A cleaner solution (without an iframe) would be to use javascript rewrite just that part of the DOM.
P.S. is it the browser rendering or the server-side generation of the list that takes a few seconds? If it's the latter, then you might want to look at caching.
P.P.S. with that many webs, you might be interested in
FlexWebListPlugin. I don't see it in your list of installed plugins.
--
SeanCMorgan - 21 Aug 2008
BASETOPIC and WEB were exactly what I was looking for. I've seen them before but never really paid attention to what they do I guess. Thanks again for the help.
--
MatthewCardozo - 21 Aug 2008