Tinderbox Forum

Very long execution time when using agent to move notes and create alias


(Paul Atlan) #1

I’m importing notes from excel and using TB to clean them up before sorting them.
The sorting is as follows:

  • put the note into a large “Clients” container
  • put an alias to the note into a container named after the $Société attribute of this note
    I have an agent which I turn on at import time:
    Query:
    $Container(original).contains("cleanedup")
    Action:
    $Container="/Shop Floor/Organisations/"+$Société;$Container(original)="/Shop Floor/Clients";

This does what I need it to do, but it takes forever. It seems like each execution cycle only processes ONE note at a time.
Now, if I only move the note to “Clients”, or it’s alias to “$Société”, everything is fast. But combining the two is long.
Of course, the solution is to sort the aliases, and then bulk move the original notes. But I’d like to understand what I’m doing wrong …


(Paul Walters) #2

I assume there is a container with the string “cleanedup” in its name? What is the difference between that container and the “Clients” container? The narrative implies that all imported notes start life in “Clients” – so how did they get into "something called “cleanedup”?

Also: see this in @mwra’s article on containers

Important: moving the agent’s alias will cause the agent’s current cycle to cease, so ensure that the processed note no longer meets the agent query or only the first matched item will move its alias. Otherwise, the agent action will move one alias per cycle. [Emphasis added.]


(Paul Atlan) #3

Sorry, my explanation is lopsided. Notes start life in /Import/imported spreadsheet, then are moved to /Import/cleanedup once I clean up the attributes (some of my attribute names are in French and have accents).

But your quote is spot on: I move the alias, so I guess the cycle stops, and I only move one note at a time. I need to rethink my workflow.