Tags:
create new tag
view all tags

Refactoring Proposal: Prerender topics to save time when viewing them

Motivation

The amount of work required to display a topic is huge. We need to reduce this amount of work to speed up TWiki.

Description

We could try to move some of the renderwork to when the topic is saved. For example: at our Twiki, a lot of topics do not contain variables. That means that the only real varying thing about the topic itself (not the lefbar etc.) is the way the WikiWords are renderred. Lists, tables, headings and wikiword selection could be done when saving the topic, saving time when reading the topic.

-- KoertVeer - 03 Feb 2006

Impact and Available Solutions

WhatDoesItAffect: Prefs, Rendering, Vars, Plugins, Refactoring
AffectedExtensions:  
HaveQuickFixFor:  

Documentation

Examples

Implementation

I am currently trying to split getRenderedVersion into two function: getPreRenderedVersion and getPostRenderedVersion. getPreRenderedVersion tries to do as much as possible, postponing things it cannot do to getPostRenderedVersion. Those things usually involve a dependancy on some external factor such as user preferences or other topics. Currently i postpone all non TML to getPostRenderedVersion, but that could of course be improved.

Other options to consider

  • A plugin/subsystem could notify the renderer that a prerendered version is user-specific, a cachesystem would keep versions of that page for every user separately.
  • A plugin/subsystem could notigy the renderer that a prerendered version expired on a certain date or time. That way even searches could be cached whithout having a major impact on validity (for example by specifying an 30 minute timeout for searches).
  • A topic could store its dependencies. That way even Warning: Can't find topic "".""
could be prerendered.


Discussion

Topic revision: r1 - 2006-02-03 - KoertVeer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.