> For the complete documentation index, see [llms.txt](https://university.mindstudio.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.mindstudio.ai/video-courses/2-workflow-mastery/running-blocks-in-parallel-for-workflow-optimization.md).

# Running Blocks in Parallel for Workflow Optimization

Learn how to group independent tasks for concurrent execution and measure efficiency gains.

{% embed url="<https://youtu.be/3KlJIKmdyPU>" %}

Running independent workflow blocks in parallel can significantly reduce execution time for your AI agents. This approach is especially beneficial when multiple tasks can be performed simultaneously without waiting for each other’s results.

### Example Scenario

An AI agent is designed to:

* Scrape multiple news websites
* Query Google News
* Generate an email digest with the top stories

By default, each block runs **sequentially**, causing unnecessary delays if the blocks aren't interdependent.

### Identifying Parallel-Ready Blocks

Look for blocks that:

* Perform independent operations
* Don’t rely on each other’s output

In this example, four blocks are scraping or querying different news sources. None depend on the output of the others, making them perfect candidates for parallel execution.

### How to Run Blocks in Parallel

1. **Select Blocks**\
   Highlight the blocks you want to run in parallel.
2. **Create a Group**\
   Right-click one of the blocks and select **Create Group**.
3. **Change to Parallel Execution**\
   Click the group label to toggle from **Sequential** to **Parallel**.

Now, these blocks will execute at the same time instead of waiting on one another.

### Performance Comparison

* **Sequential Run**: \~60 seconds
* **Parallel Run**: \~25 seconds

Parallelizing the scraping and news querying tasks led to a **58% reduction** in workflow execution time.

### Benefits

* **Speed Improvements**: Reduce total run time significantly.
* **Better User Experience**: Faster responses for time-sensitive tasks.
* **Scalability**: Makes workflows more efficient as complexity grows.

### Summary

To optimize your workflows:

* Identify independent tasks
* Group them into a parallel execution block
* Re-run and measure the performance impact

Using parallel execution in MindStudio can lead to major gains in efficiency, especially for content aggregation, multi-source processing, and automation workflows.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://university.mindstudio.ai/video-courses/2-workflow-mastery/running-blocks-in-parallel-for-workflow-optimization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
