Hi Saq, Hi Mario, Many thanks for very useful information! I got the point! Coming from other languages, especially the modular ones (structured programming world) you tend to use macro!
I am trying to shift to template transclusion! Best wishes Mohammad On Tue, Jun 1, 2021 at 6:24 PM Saq Imtiaz <[email protected]> wrote: > > - 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. > - NEW IN: 5.1.23 Parse trees are now cached for macros that do > *not* perform any text substitution either via parameters or > variables (i.e. $parameter$ or $(variable)$). > > From https://tiddlywiki.com/#Performance > On Tuesday, June 1, 2021 at 3:45:41 PM UTC+2 Mohammad wrote: > >> Bringing up this again: * Transclusion: macro or template* >> >> >> 1. Can I say, I should use template when I am going to use many >> fields like {{!!title}} or I use currentTiddler in my template? >> 2. I think I have also heard from Jeremy that template trasclusions >> are faster that macro call! Is this true? >> >> >> >> On Sunday, September 29, 2019 at 10:36:55 AM UTC+3:30 Mohammad wrote: >> >>> I want to transclude a tiddler or different part of tiddler! I normally >>> use template >>> >>> So, for example >>> I want to show the content of a tiddler say myTiddler I use >>> template-code tiddler as below >>> >>> {{myTiddler||$:/utility/template-code}} >>> >>> >>> I can also wrap the content of $:/utility/template-code in a macro like >>> tp-code and have >>> the same functionality as below >>> >>> <<tp-code myTiddler>> >>> >>> >>> Pros and cons >>> >>> - writing the long name template is tedious in daily work >>> - using smaller name like tpcode makes it appear everywhere >>> - using macro is simple and its tiddler is hidden but semantically >>> template is better >>> >>> >>> What do you think? and what do you propose >>> >>> --Mohammad >>> >>> >>> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/36906d30-6df1-40b9-ab8e-60554da177cfn%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/36906d30-6df1-40b9-ab8e-60554da177cfn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMAWtWaJbGnqtoS%2BEL27YS4eY%3DQ%2BhMD%2BsfqYYjvXDfxvsg%40mail.gmail.com.

