• 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.

Dakar calls a Plugin's commonTagsHandler many more times than Cairo.

Here is the debug.txt output of Cairo for viewing TWiki.:BlackListPlugin with Plugin's flag DEBUG = 1

29 Oct 2005 - 14:11 BlackListPlugin - _handleBanList( Action: read, IP: 71.141.119.124 )
29 Oct 2005 - 14:11 BlackListPlugin - _handleEventLog( IP: 71.141.119.124, type: /path/to/bin/view, query: )
29 Oct 2005 - 14:11 BlackListPlugin - initPlugin() score: 2
29 Oct 2005 - 14:11 BlackListPlugin - initPlugin( TWiki.BlackListPlugin ) is OK, whiteList (127\.0\.0\.1), blackRE (203\.88\.152\.|203\.88\.155\.|219\.65\.75\.|203\.88\.152\.3|1\.2\.3\.4)
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - _handleBanList( Action: read, IP:  )
29 Oct 2005 - 14:11 BlackListPlugin - _handleSpamList( Action: read, value:  )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.WebTopBar )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.WebLeftBar )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.WebBottomBar )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )
29 Oct 2005 - 14:11 BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )

Here the output on Dakar, same topic content:

| 29 Oct 2005 - 13:27 | BlackListPlugin - _handleBanList( Action: read, IP: 71.141.119.124 )
| 29 Oct 2005 - 13:27 | BlackListPlugin - _handleEventLog( IP: 71.141.119.124, type: /path/to/bin/view, query:  )
| 29 Oct 2005 - 13:27 | BlackListPlugin - initPlugin() score: 21
| 29 Oct 2005 - 13:27 | BlackListPlugin - initPlugin( TWiki.BlackListPlugin ) is OK, whiteList (127\.0\.0\.1), blackRE     (203\.88\.152\.|203\.88\.155\.|219\.65\.75\.)
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebTopBar )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
| 29 Oct 2005 - 13:27 | BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
| 29 Oct 2005 - 13:27 | BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebBottomBar )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebLeftBarSearch )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebHome )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebHome )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebHome )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebHome )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( NOWEB.NOTOPIC )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebLeftBarWebsList )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.WebLeftBar )
| 29 Oct 2005 - 13:27 | BlackListPlugin - commonTagsHandler( TWiki.BlackListPlugin )
| 29 Oct 2005 - 13:27 | BlackListPlugin - endRenderingHandler( TWiki.BlackListPlugin )

Performance can be increased a lot if the tags handler is only called when needed.

For Dakar release we should figure out what these calls are and pick the low hanging fruits to reduce the number of calls.

See attached debug.txt dump that shows the actual text to be rendered by commonTagsHandler. For example, there is a call for every doc graphic image; expanding variables (and calling commonTagsHandler) for each image can probably be avoided.

-- PTh

Performance can be increased a lot? Do you have figures to support that statement? AFAICT unless a plugin defines a really bad handler, each of those calls should be pretty fast. Certainly commonTagsHandler doesn't even appear on the profile hitlist when running with DProf and all default plugins. Yes, we could optimise the number of calls, but it never seemed worthwhile to me.

CC

I did not measure it. It is not just the commonTagsHandler, that handler is called from TWiki's internal variable handler, so even more time can be gained by reducing excessive calls. Some proprietary Plugins might spend more time in commonTagsHandler, another reason to optimize. I think that calling commonTagsHandler for each %ICON{}% is a low hanging fruit that can be fixed easily.

Lets defer this in the interest of the release.

-- PTh

Undeferred, post Dakar CC


Compared with other performance issues (mainly code compilation) this is irrelevant. Replacing plugins global replace of variables with registered tag handlers, for example, which allows you to eliminate many common tags handlers.

Discarding.

CC

ItemTemplate
Summary Performance: Excessive calls to commonTagsHandler
ReportedBy PeterThoeny
SVN Range

AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

TargetRelease major
Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt debugdump.txt r2 r1 manage 29.9 K 2005-10-29 - 21:29 PeterThoeny debug.txt dump on Dakar for /bin/view/TWiki/BlackListPlugin
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r7 - 2006-03-04 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback