feat: parallelized mapstreamer #242
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the Mapstreamer implementation to process multiple requests concurrently. Previously, requests were handled sequentially within a single async loop. With this change, each incoming request is dispatched to its own background task, allowing responses from different requests to be streamed back in parallel.
Testing code
Old Implementation
New Implementation
2025-09-02T20:36:44.213891Z INFO sink::log: Payload - Starting task 1756845404.1992428 Keys - ... ID - out-1-0-0
2025-09-02T20:36:44.213908Z INFO sink::log: Payload - Starting task 1756845404.2001758 Keys - ... ID - out-2-0-0
2025-09-02T20:36:44.213911Z INFO sink::log: Payload - Starting task 1756845404.201107 Keys - ... ID - out-3-0-0
2025-09-02T20:36:44.213914Z INFO sink::log: Payload - Starting task 1756845404.2018268 Keys - ... ID - out-4-0-0
...
2025-09-02T20:36:49.217125Z INFO sink::log: Payload - Ended task 1756845409.2048292 Keys - ... ID - out-24-0-0
2025-09-02T20:36:49.217133Z INFO sink::log: Payload - Ended task 1756845409.2049541 Keys - ... ID - out-27-0-0
2025-09-02T20:36:49.217139Z INFO sink::log: Payload - Ended task 1756845409.2050297 Keys - ... ID - out-30-0-0
Log files
old_logs.txt
new_logs.txt