diff --git a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid index a701a06ac..d4d660132 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Performance.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Performance.tid @@ -1,5 +1,5 @@ created: 20150330155120127 -modified: 20190316163827303 +modified: 20190609154450433 tags: [[Working with TiddlyWiki]] title: Performance type: text/vnd.tiddlywiki @@ -11,3 +11,15 @@ TiddlyWiki ships with defaults that are designed to get the best out of modern d * ''Avoid large tiddlers''. Large bitmaps can significantly slow TiddlyWiki's performance. For example, an image taken with a modern smartphone will often be 5MB or more. Use ExternalImages whenever possible * ''Don't have too many tiddlers open at once''. Every tiddler you have open will require processing to keep it up to date as the store changes (for example, while you type into a draft tiddler). It is particularly easy when using zoomin story view to end up with dozens of tiddlers listed in the ''Open'' tab in the sidebar. Get into the habit of periodically closing all open tiddlers with the {{$:/core/images/close-all-button}} ''close all'' button * ''Use the built-in performance instrumentation''. Studying the [[performance instrumentation|Performance Instrumentation]] results can help highlight performance problems +* Take advantage of indexed filter operators. The following constructions at the start of a filter run will be optimised to run many times faster than otherwise: +** `[all[tiddlers]tag[x]...` +** `[all[shadows]tag[x]...` +** `[all[tiddlers+shadows]tag[x]...` +** `[all[shadows+tiddlers]tag[x]...` +** `[all[tiddlers]field:y[x]...` +** `[all[shadows]field:y[x]...` +** `[all[tiddlers+shadows]field:y[x]...` +** `[all[shadows+tiddlers]field:y[x]...` +** 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. +