Performance Tips
Logging Level
For fast running Automations, or Automations that generate many log entries, you should add a Set Logging Level action to the start of your Automation, with the logging level set to 'minimal'. This will significantly increase performance and reduce the Message Store database size.
Concurrent Automation Processing
By default the Message Processor Service starts 8 separate tasks for Automation processing. Each separate Automation is assigned to one of these tasks. This means that by default 8 Automations can process messages at the same time. If all tasks are processing then new messages will wait in a queue. Messages for each Automation are processed by their assigned task one at a time in the order that messages are received.
You can increase the number of tasks that the Message Processor Service uses in the Server Settings - Message Processor.
Increasing the number of tasks may or may not provider better performance. It depends on how ThinkAutomation is used and the processor capacity available. If you have a small number of Automations that process many thousands of messages per day then increasing the number of tasks will in most cases not make any difference. If however you have many Automations processing a few hundred messages per day each at ad-hoc times (for example - Web Forms) then increasing the number as tasks will provide a faster response time during busy periods.
Increasing the number of tasks will also increase the memory usage of the Message Processor Service.
Individual Automation Concurrent Processing
Specific Automations can also be flagged to Allow Concurrent Execution (set on the Automation Properties tab). This setting defines if messages for the SAME Automation should execute concurrently. This option is disabled by default on new Automations. In most cases you should not need to enable this. If this option is enabled then messages for the same Automation may be processed in a different order than they were received (or more specifically, message 1 may complete before message 2). You should also ensure that your Automation is not updating anything that does not allow concurrent write access. For example: If your Automation updates an Excel file - if one or more messages are executing at the same time the Excel file may block access because it is already open.
Message Store Database
Use a local (installed on the same computer as ThinkAutomation) SQL Server, MySQL, PostgreSQL or Mongo DB Message Store types for best performance. The built-in SQLite Message Store database may give better performance than a remote SQL Server database (depending on your configuration and existing database load).
The built-in SQLite database will provide adequate performance and requires no external database. The ThinkAutomation computer will use less memory overall compared to a locally installed external database. If you are processing ~1000 messages per day or less, then the built-in database will be suitable.
Only keep messages in your Message Store database for as long as you need to. The Keep Messages For (Days) entry on the Solution properties controls how long messages are stored. ThinkAutomation will automatically delete old messages each day. If you are processing many thousands of messages per day but do not remove old messages then your Message Store database will eventually become slower. Also remember that if you use the free version of SQL Server (SQL Server Express) - that this has a limit of 10gb per database.
If you use a shared remote database server for your ThinkAutomation Message Store then you should ensure that this database is available at all times. The ThinkAutomation server checks if the message store database is available every 30 seconds. If it is not available it will pause processing until the database comes back online.
Sending Bulk HTML Emails
If you need to repeatedly send a complex HTML email (eg: A marketing style email with many styles/images etc) you should prepare the HTML file beforehand and save it to a file. All CSS stylesheets should be converted to inline styles for maximum email client compatibility. Using the Send Email action, you have the option to Embed Images and Convert CSS To Inline Styles. However these operations are time consuming - and if you are using the Automation to send the same email many times it will be resource intensive. It will be faster to use the Use External File Or URL For HTML option to reference a local HTML file (not URL). The HTML in the file can still contain %variable% replacement markers.
Slowing Down Processing
Sometimes your Automation may execute too fast - for example if posting to an external API or hosted CRM that enforces rate limits. In these cases you can use the Sleep custom action (available in the Custom Action On-Line Library) to slow down the Automation. Place this action anywhere in your Automation.