I tend to use global macros even in complex wikis without any impact noted yet. You can use dumpvariables to gauge how large this impact is.
We can use import variables to include macros that are not global.
Depending on how macros are written the size of the included code on every tiddler can be quite different as I understand it. Using conditions in templates tagged for the view template or the reveal widget will change what is included with the rendered tiddler.
Because of these various factors I tend to write with a view to being brief and minimalist with conditions but let myself use globals whenever the use is broad.
Regards
tony
Mal
Not avoiding duplicate names is the problem from which importvariables is a work around.
Tony
Hi Tony
> Not avoiding duplicate names is the problem from which importvariables is a work around.
The purpose of importvariables is to allow macros to be local to a particular tiddler, giving much more flexibility in their reuse. Variables in TW are much like variables in an ordinary programming language in that we can reuse the same variable names in separate functions/tiddlers without them clashing.
Best wishes
Jeremy
>
> Tony
>
> --
> You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
I understood, the encourage is NOT to use global variable and seems performance is here not a big issue!
----Mohammad
On Saturday, April 6, 2019 at 12:31:16 PM UTC+4:30, Jeremy Ruston wrote:Hi Tony
> Not avoiding duplicate names is the problem from which importvariables is a work around.
The purpose of importvariables is to allow macros to be local to a particular tiddler, giving much more flexibility in their reuse. Variables in TW are much like variables in an ordinary programming language in that we can reuse the same variable names in separate functions/tiddlers without them clashing.
Best wishes
Jeremy
>
> Tony
>
> --
> You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
> To post to this group, send email to tiddl...@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a0563edb-cc4c-44c2-a6b4-b5d060deb319%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/42cbc1dd-0cf4-4515-bda2-69dbf7451e43%40googlegroups.com.
Hi Mohammad