Hi Mat A great list of questions, thanks for sharing.
I'll give some response to each, but overall I'd strongly urge you to *measure* things yourself. TiddlyWiki is a sufficiently complex system that its emergent behaviour is sometimes hard to predict, even for me. The community regularly demonstrates this by developing techniques that I haven't anticipated, and have taken me by surprise (the good kind!). > - In a *filter*, does it make significant difference to put the cruder > operators+operands first/leftmost? > > Each operator will run faster the fewer items that are being considered, so you should indeed put the operators first that select fewer items. > > - And particularly, does a filter with one compound expression ever > stop mid filter e.g if the expression that far results in empty and the > rest of the expression operators need input to be meaningfully run? I think > this would require a kind of meta evaluation first to decide what type of > an expression the argument is. > > No, an empty intermediate result will still be passed to the remaining operators in the filter expression. I'd be surprised if such an optimisation had much impact: most filter operators perform well with an empty item list. > > - Does a ViewTemplate tax the system more than the average tiddler > considering how viewtemplates are transcluded into all other tiddlers? > > Yes; put more clearly: the view template is highly critical to performance since it impacts each tiddler displayed in the story river. > > - Or does a viewtemplate only cost when a tiddler is actually open > (and in viewmode)? > > Not exactly. Conversely, the view template has no impact on performance when no tiddlers are displayed. > > - ...and does the viewtemplate only cost in that particular tiddler or > does it cost globally? For example, if I open a *stylesheet *that is > NOT tagged $:/tags/Stylesheet, then these styles are active globally for as > long as the tiddler is open. A macro on the other hand, has to be called > (and I must assume it doesn't cost anything more than plain text before > that). > > The view template impacts performance in each tiddler displayed in the story river. There is an impact to global macros that are not invoked, because the macro definition still needs to be processed. > > - Do local style blocks cost differently than dedicated stylesheet > tiddlers? > > It depends. A local style block in the view template will have an impact for each tiddler in the story river. > > - Are wikitext solutions different in cost from their eventual > widget/html/css counterparts? (e.g curly bracket transclusion vs > transcludewidget, pipe characters vs html table, @@ vs wrapping in a span > to style...) > > I wouldn't have thought it would make much difference: both curly bracket transclusion and the transclude widget need parsing, and the result of the parsing is the same. > > - Do the cost for keeping (plain text) tiddlers open increase linearly > or perhaps exponentially? > > I would expact it to be linear. > > - Tiddlers in view mode vs in edit mode? For example, why do things > slow down substantially when the vanilla stylesheet is in edit mode? Is it > the mere size of it? Does an editview tiddler affect the actual tiddler > content which slows rendering? > > The edit template is much more complex than the view template (particularly when using the new editor). > > - And apropos (something like) the vanilla stylesheet - if it were > split up into multiple tiddlers, e.g one tiddler per style definition, how > would that affect wiki performance? I keep hearing about TWs with X > thousand tiddlers and "it works fine", so is tiddler *length *a > sensitive issue? > > In the case of stylesheets I wouldn't expect one big tiddler to have a significantly different performance than lots of little ones. Tiddler length is only a sensitive issue for certain operations, like rendering and searching. > > - What tiddlers or *types *of tiddlers, if any, or what type of > content, is constantly taxing the system? Pagetemplate tiddlers? Macros? > Anything tagged X? > > I think that's the wrong question. There is just one widget tree, generated from the page template. > > - Are there ways to ensure lazy loading of stuff? For example, it is > known that long lists in the sidebar tabs can cause slowness (...or is it > only for some of those tabs?) - but to prevent it, you can simply switch > tab to a short list... so does that mean that content in non-active tabs > are "turned off"? > > Please don't use the term "lazy loading" here; it already has a precise, specific meaning within tiddlywiki. By default, the reveal widget (which is used in the tabs macro) completely removes hidden content from the widget tree. That speeds the refresh cycle, but means that the entire content must be re-rendered when the content is revealed. A "retain" attribute is supported which causes the reveal widget to maintain it's content even when hidden, so that it can be revealed more efficiently. > - ...same question for reveal widgets; Is their content inactive when > it is not revealed? Or does it perhaps keep on running until tiddler is > closed? or even after that? > > As above: the reveal widget is the mechanism by which tabs hide and show their content, so it's the same as the previous question. Hope that helps, feel free to ask if anything isn't clear, Best wishes Jeremy > > - > > > I'm guessing the common answer to all the above example(!) questions is > "it depends on [specifics]" - but, I'm asking for general rules of thumb. > > Thank you! > > > <:-) > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/tiddlywikidev. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywikidev/c9ab977d-00ac-4c8b-9dd6-1e91666b4a3c%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywikidev/c9ab977d-00ac-4c8b-9dd6-1e91666b4a3c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAPKKYJa6uXyKdJjJ3w%3DFhaNvOHERMHX0%2B6EfqSZyOoSbf%3DU8%3Dw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
