• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Pattern skin loads TwistyContrib's css and js by default. But when TwistyPlugin is enabled, both files are added to the head to load as well. And both additionally load twiki.js. See Item1653.

This seems a lot of overhead.

In the meantime, the plugin 'head handling' has been cleaned, so that now TwistyPlugin only is loaded if there is a TWIST tag on the page.

Proposal: make the whole thing leaner and cleaner by making pattern skin rely on TwistyPlugin. Some refactoring is needed to convert the current html twisties to TWISTY tags.

There is an enormous optimization possible: since TwistyPlugin knows about the TWISTY tags on the page, it can generate javascript to directly address the html elements to be shown/hidden- instead of the current slow approach of scanning the page looking for possible tags.

Disadvantage: a user might disable TwistyPlugin in configure, and a lot of TWISTY tags will show up.

AC

The gain is hight the loss marginal if there at all. I'd say go for it smile

MD

Now that I've rewritten TwistyContrib with speed gains, and optimization for TwistyPlugin is no longer seems necessary, I found two more motivations to let pattern skin use TwistyPlugin:

  • TwistyPlugin js is now a singleton class; importing the js file twice will also invoke the singleton constructor twice (so all UI elements will be registered twice and so on). This defeats the speed gain.
  • Any changes to the plugin css/div/span layout need to be handcrafted through all of pattern skin templates. Wouldn't have been necessary with TWISTY syntax.

AC

Done. See TwistyPlugin for the latest additions.

AC

4.1.0 released

KJL

ItemTemplate
Summary PatternSkin: Dependence on TwistyPlugin instead of TwistyContrib (performance improvement)
ReportedBy TWiki:Main.ArthurClemens
Codebase

SVN Range Tue, 21 Feb 2006 build 8854
AppliesTo Extension
Component PatternSkin, TwistyPlugin
Priority Enhancement
CurrentState Closed
WaitingFor

Checkins 10527 10532 10533 10537 10538 11162
TargetRelease minor
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r16 - 2007-01-16 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback