Based on the JSON, it seems that the If Condition activity is not the cause of the slowness.
The IfCondition activity depends on the successful completion of two previous activities: set_latest_state_cursor_value and create_table_if_not_exist.
If either of these activities takes longer than expected the start of the IfCondition will be delayed. Even though the IfCondition itself is simple, any delay in the preceding activities will impact its execution time.
and In the ifTrueActivities branch, there's a Script activity that runs a TRUNCATE TABLE command on a Snowflake database. If this branch is triggered, the script execution could introduce delays, especially if there's any transient connectivity issue or the Snowflake environment itself is under load.
Since you're using the AutoResolveIntegrationRuntime, this IR might be under heavy load at times, which could slow down the execution of both the IfCondition activity and the subsequent activities. This is true if multiple pipelines or activities are running concurrently on the same IR..
To troubleshoot the performance issue, you can use Azure Monitor to check the detailed performance metrics of the activities for any spikes in CPU, memory usage.
Additionally, you can check the Snowflake performance to ensure that it is not the bottleneck.