It is used here:
exports.getTiddlersWithTag = function(tag) {
// Try to use the indexer
var self = this,
tagIndexer = this.getIndexer("TagIndexer"),
results = tagIndexer && tagIndexer.subIndexers[3].lookup(tag);
if(!results) {
// If not available, perform a manual scan
results = this.getGlobalCache("taglist-" + tag,function() {
var tagmap = self.getTagMap();
return self.sortByList(tagmap[tag],tag);
});
}
return results;
};
which caches the results to make it faster afterward, this works well for
when a tag isn't on too many tiddlers, but I have no idea what 'too many'
is here.
I haven't dug too deeply into the cache mechanism and there may be some
maximum size after which it won't cache results, if that is the case than
it may have to build the results every time the tag is looked up instead of
being able to use the cached result.
--
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/160dda32-67cc-4078-b76a-3e2408239d99%40googlegroups.com.