Hey all,
I was hoping to get some advice on a performance issue I’m having in my Kansas Railroads wiki.
I have a tiddler that displays in a tab in the sidebar that shows a list of the predecessors of certain railroads (see included code). The Predecessors of Railroads is the one that is in the sidebar which calls the New TOC macro. It has a select widget which selects which railroad to show the predecessors for. The select widget is followed by a table that shows the current status of what is selected ($:/state/fieldforstatus is simply a subfilter to check if the current railroad has the matching status or not - note: I don’t think this is where the problem lies because I use this identically in a flat list of railroads with no issue).
If this sidebar tab with Predecessors of Railroads is opened for the first time, it can take up to 1.2 seconds for displaying a list of only 126 tiddlers. The refresh takes on the order of 920 milliseconds. This seems horribly excessive to me for such a small list of tiddlers.
I’ve thought about using suggestions from previous posts concerning throttling refresh, but this seems much more fundamental than a refresh issue for a large number of tiddlers (126 is not large) and that something in the code could be done vastly more efficiently.
I’m suspecting that at least part of the issue is my use of the kin filter in declaring a couple of variables. I am using the kin filter to determine the railroads that have the current railroad as a tag. I probably could replace the kin filter with tagging[] here instead. Would that help performance in and of itself? I haven’t actually experimented witht this yet because I just thought of it as I was composing this message.
I’m also wondering if the toc-new macro has some inefficiencies in it.
Thanks for any advance. It’s all welcome.
New TOC macro.tid (2.9 KB)
Predecessors of Railroads.tid (4.7 KB)