reveal if field[x]
list filter tag[y] limit[1]
stuff to show
/list filter
/reveal
list filter field[x]tag[y] limit[1]
stuff to show
/list
1. questionif I hide something (a filter) with the reveal widget, will it be bypassed or will it still run the filter but not show it? or is there a better way (for speed) to toggle between things?
2.questionis there any advantage in combining filters vs. nesting them?
<$list filter="[all[tiddlers]tag[something]]">
<$list filter="[<currentTiddler>has[field]]">
</$list>
</$list>
<$list filter="[all[tiddlers]tag[something]has[field]]">
</$list>
<$list filter="[speceficTiddler!!field[yes]<currentTiddler>has[field]]">
[all[tiddlers]tag[something]has[field]]
vs
[tag[something]has[field]]
I'm not quite sure what you're trying to accomplish in question #1. Please post your code and someone may come up with a solution :) (I'll try my best too).
As goes for question #2, it's good practice to start building your filters by defining the fundamental category as explained here. There might be performance benefits too, but I'm not qualified to answer this part of your question.
Yes, I understand your objectives, but I cannot answer in code if I don't have your building blocks.Anyway, to answer your question on a high level, if your reveal widget evaluates to False, then anything it embeds (filters included) is simply not run, which does save time.If it evaluates to True, well, then I guess your best bet would be to run performance instrumentation to see how it performs, as Mario suggested above. The same applies to your filter run, as long as you can embed the functionality of a reveal widget in your filter syntax. By running performance instrumentation you can test different solutions and boost processing time by a few hundred ms in the best of cases.Apologies if this appears vague, I just don't want to speculate.
[all[tiddlers]all[current]tagging[]]
[all[current]tagging[]]
Hi,You can measure the performance of filters if you install the "Tools for exploring the internals of TW" plugin. ... ANDEnable Performance Instrumentation in the ControlPanel: Settings tab ... THENSAVERELOADIn the browser dev tools F12 you'll see some text: $tw.perf.log()Enter this string into the console tab and hit enter.
You'll get a detailed overview, which filters are called, how often they are called and the time they need.
Open / Close / Open the tiddlers that contain your filters, and you'll see the impact they make.have fun!-marioPS: Should I record a video about this?