So I figured out a way to get this to work.

/define some_macro()
<<set_timefields>>
<$set ..... >
<$action-setfield .....>
/end

<$button actions=<<some_macro>> to="destination" class="blah">
Button Title
</$button>
By shoving the costly set code into a macro, I prevented it from being 
rendered until the button is actually clicked.  So much faster now!


On Sunday, December 24, 2017 at 11:18:00 PM UTC-6, David Allen wrote:
>
> Hey everyone!  I have buttons that, when clicked, set a field in a tiddler 
> using a filter that sorts through six thousand tiddlers.  The buttons 
> responsible for this are slowing down my wiki considerably.
>
> Here's the code for the buttons I use
> <$button to="Good Tumblr" class="tab_button">Good
> <<set_timefields>>
>
> <$set name="goods" filter="[tag[tumblr]!year{Sandbox_Retrieve!!year}] 
> [tag[tumblr]year{Sandbox_Retrieve!!year}!month{Sandbox_Retrieve!!month}]+[category[good]!prefix[Template]sort[modified]!has[format]!has[improve]limit[5]]">
>
> <$action-setfield $tiddler="Sandbox_Retrieve" $field="goods" 
> $value=<<goods>> />
>
> </$set>
>
> </$button>
>
>
>
>
> I have some pages that have several of these buttons on a page at one 
> time, and these slow the wiki more than others.  Can anyone tell me if 
> there's something I can do to speed up my wiki? Thanks!
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/2e18043b-cd05-4d10-bba5-653b7dd7a36f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to