perf: load components parallel#123
Conversation
Signed-off-by: Robin <48644042+born-in-autumn@users.noreply.github.com>
perf: load components parallel
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull Request Overview
This PR improves the startup performance of the Wassette MCP server by implementing parallel loading of WebAssembly components instead of sequential loading.
- Replaces sequential component loading with concurrent execution using
futures::join_all - Adds graceful error handling where individual component failures don't prevent other components from loading
- Maintains backward compatibility with existing APIs and error handling patterns
| } | ||
| } | ||
|
|
||
| Ok(components) |
There was a problem hiding this comment.
The indentation is inconsistent with the rest of the function. This line should align with the other statements in the function body.
| Ok(components) | |
| Ok(components) |
thomastaylor312
left a comment
There was a problem hiding this comment.
This is looking great, but can you run cargo +nightly fmt --all and make sure you don't have any unused exports? Should be good to go after that!
|
@born-in-autumn Sorry for the hassle, but my PR with some changes to the loading as well just merged and it conflicts. Shouldn't be too bad to rebase, but it will need to be done manually. If you need any help, let me know! |
Signed-off-by: Robin <48644042+born-in-autumn@users.noreply.github.com>
Signed-off-by: Robin <48644042+born-in-autumn@users.noreply.github.com>
@thomastaylor312 Conflicts resolved ! 🔥 and the previous code formatting issues have also been included in the latest changes,Ready for final check 👀 |
|
@thomastaylor312 Hope you're having a great weekend! 🌞 |
Problem
Wassette MCP server experienced noticeable startup delays when loading multiple WebAssembly components due to sequential loading.
Solution
futures::join_allPerformance Impact
Changes
load_components_parallel()functionLifecycleManager::new_with_policy()to use parallel loadingFixes #68