Hi Tony, I had a thought about this - when I was starting out with TiddlyWiki, I would often write something like "[tag[MyTag]] [backlinks[]]" rather than "[tag[MyTag]] +[backlinks[]]" in the advanced search, which would freeze up my wiki. I've since learned better (for the most part), but it got me thinking about running filters in an async fashion. Here are some timings from my wiki (currently around 8700 tiddlers):
- [all[]] 2306.00ms - [backlinks[]] with indexer 1196.00ms - [backlinks[]] without indexer 1421496.00ms I've had some ideas for running filters in the background, like leveraging web workers, or doing some sort of cooperative multitasking - but honestly I think it might be better just to lean into the new(er) indexing facilities TiddlyWiki has added for filters. This would "lift all boats", so to speak, but the web workers/cooperative multitasking ideas I had have other costs such as memory usage and making filters harder to write. Instead, I'm wondering if shifting the rendering of many tiddlers that match a filter into the background might be a useful hack in this case, and I don't think it would be *too *hard to do. There could be a <$lazy-list> widget that could run a filter, store its results, and then transcludes a temporary tiddler. In the background, a timer would take a couple results from the filter at a time and render them to the temporary tiddler, building it up dynamically. In my experience, it's the rendering that takes up much of the time when building large lists of tiddlers like this. -Rob On Monday, August 31, 2020 at 8:09:38 PM UTC-5 TonyM wrote: > Folks, > > In my response here to a performance issue > https://groups.google.com/d/msg/tiddlywiki/Y1SMtIen5ww/Nn9kggVFCAAJ > > I was wondering if the fact Tiddlywiki always refreshes everything is not > forcing everything through one process? > > Whilst this may be needed as a rule, where has being a few question raise > and refresh suppression I was wondering if there is an opportunity to allow > some processes to be moved into their own thread, perhaps leaving a splash > screen equivalent behind while the process runs? > > Could we wrap a section of wiki text in a widget that does this, knowing > full well that unless intermediate results outside the process is not a > dependency, the process is independent and only rendered when complete? > > - This would allow interaction to return to the user quicker > - It provides for large dataset cases > - We could even hide the process behind a refresh button, or previous > results. > > > Why > > - This could extend tiddlywiki into larger datasets and more efficient > processing, and higher interactivity. > > > Regards > Tones/Tony > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev/20efab87-7893-4279-b956-c9e27f14a893n%40googlegroups.com.
