From f798eab33f0621f20b79f794d4c51ec776f6fd62 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Sat, 5 Dec 2020 17:30:49 +0100 Subject: [PATCH] Update documentation on Performance (#5203) --- editions/tw5.com/tiddlers/workingwithtw/Performance.tid | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid index 83ee7de91..68fa1f230 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid @@ -1,5 +1,5 @@ created: 20150330155120127 -modified: 20191014091943444 +modified: 20201205104857625 tags: [[Working with TiddlyWiki]] title: Performance type: text/vnd.tiddlywiki @@ -28,4 +28,5 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d ** Note that the field indexer currently defaults to indexing field values of less than 128 characters; longer values can still be searched for, but no index will be constructed ** Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, `[all[shadows+tiddlers]caption[x]...` is optimised. * Use the [[throttling|RefreshThrottling]] feature of the RefreshMechanism judiciously - +* Keep in mind that ''transcluding separate tiddlers is more performant than heavy use of macros'' and the difference can be significant in some situations. The result of parsing each tiddler is cached and reused the next time if the tiddler has not changed. The same technique cannot be used for macros and they have to be re-parsed every time, as they are not global but local to the widget tree. +* Where possible ''use the SetWidget or VarsWidget with filters instead of the WikifyWidget'' for declaring variables and string concatenation. The performance of the wikify mechanism is relatively poor as there is no opportunity to cache the parse tree or widget tree.