This, from forthcoming notes, may help:
Taggers are particularly useful to agents. Often, an agent needs to look for significant or interesting terms in the text:
$Text.icontains(“Caesar”) |$Text.icontains(“Cato”) …
In projects that have lots of text, these agents have a difficult task: each clause might need to search all the text in the document, and each clause needs to build a regular expression matcher. The tagger is more restricted—it searches only for entire words, not for regular expressions—but it is significantly faster and it runs only when the text of the notes changes. In the example above, we could replace the query with the simpler query
and add a single line to the $Text of the /Hints/Taggers/NLTags note:
Rome: Caesar; Cato; Cicero; Aggripa; Brutus; Decius; Catullus
Now, the agent needs only to examine set $NLTags, which requires far less work than searching all the text of a large document.
So, this implies the tagger runs if/when $Text changes. But, behind the scenes there may be lots of other tasks to do (queries, rules, autofetch, watched folders, etc. Your report of timing would suggest the $Text change adds the note to a queue for the tagger process to action but the that task may have to wait for other processes to run. @eastgate is that a fair analogy?