If your environment is taking a long time to process a tree, there is a good chance that it needs to be tuned/optimized for your environment. One way to check on the state of your engine is to look at the backlog (see image below)
If there are hundreds or thousands of triggers in your backlog, there is a good chance that you will need to add more threads, optimize your trees (reduce the number of loops by combining loops into a custom task handler), or add additional task servers.
There are a number of variables that affect the speed in which the task engine can process trees. Each variable has potentially different symptoms and solutions.
The task engine is in constant communication with its SQL database to determine what work needs to be processed. If your task engine is slow, it is helpful to check with your DBA to determine if there is a database, network, or server issue that could be causing a bottleneck in processing triggers.
Task engines run within a web server that has a limited amount of Memory and CPU allocated. If your task engine is slow, checking to see what resources are being consumed on the server is a good first step in determining the bottleneck. If your Memory or CPU is near 100% utilization, you will likely want to reduce the number of threads that the task engine is running and deploy an additional task server to handle the expected load.
The way that the Task engine worker threads work, is that each one processes a branch of the tree based upon the trigger. If there are too few worker threads, and the tasks that are executed as part of the branch are "slow" (which blocks the worker thread) than Kinetic Task may back up. If there are too many worker threads, the tasks that are being executed may "overload" the systems they are interacting with.
Increasing the number of threads that the task engines workers can use will typically solve the problem of backlogged triggers. When increasing threads, pay close attention to the servers CPU / Memory constraints as each thread will use more resources. If you max out a servers resources, you will need to either add more resources or deploy another Task Engine to handle the expected load.