Echoing Andreas' points, it's worth stressing that very little work has yet
gone into optimising the implementation of TW5 (there's been a lot of
emphasis on optimising the architecture eg selective updating of the DOM).
So, there's generally a lot of scope for optimisation.

Having said that, I suspect that it's not actually the searching that's
taking the time in the cases reported here; it's more likely to be the
refreshing of the sidebar and story river (particularly the "recent" tab,
which is inherently slow to render).

Picking up some other points:

* It's sub-optimal that searching occurs when only one or two characters
have been typed in the search box (we've recently been discussing fixes for
this over on GitHub)
* Obviously, it's impossible for the browser to search lazily loaded
tiddlers without loading their content from the server. The only way around
that is to have server side support for searching (which I'd certainly like
to add).
* The lack of UI feedback during time-consuming operations is definitely
sub-optimal. The problem here is that these operations block the browser,
making it impossible to display feedback
* The number of binary tiddlers shouldn't make much difference to searches;
the core only searches text tiddlers (whether wikitext, plain text or other
UTF-8 encoded text format)

So, going back to Jon's original question, the answer is "yes", search
performance will improve as we address the issues above.

Best wishes

Jeremy.




On Tue, Feb 24, 2015 at 1:52 PM, Andreas Hahn <[email protected]>
wrote:

> Hi,
>
> Mat is right though: TiddlyWiki is not optimized for speed. In almost all
> cases TiddlyWiki prefers structural quality, correctness and simplicity of
> implementation over speed. Also a lot of features are only implemented just
> so they are available, but noone optimized them yet.
> The search for instance (correct me if I am wrong with the following)
> applies a regex to all tiddlers in which it searches, which in simple cases
> (like most searches) means quadratic runtime at minimum. (So to explain it:
> if you double the tiddler count, the search will take 4 times the time,
> provided all tiddlers are equal length).
> So to answer the question: I guess Jeremy is aware that at some point the
> search becomes very slow in larger TW files and that there are significant
> speedups possible, however they will require work and are currently not
> important enough to be worked on. So it will probably get quicker, when TW
> gets more mature.
>
> /Andreas
>
> P.S.: Also, I have a question: Provided I would have lazy loading set up
> for most of my tiddlers. Does doing a search mean that all tiddlers will be
> loaded when I do the search ? Because .. It sure seems that way.
>
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to