Implemented parallel processing where applicable#460
Merged
Xhristin3 merged 1 commit intoApr 27, 2026
Conversation
|
@ryzen-xp Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Xhristin3
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🚀 Pull Request
📋 Description
This PR implements parallel processing across the indexer and build infrastructure to significantly improve throughput and reduce latency. It addresses bottlenecks in historical data backfilling, event processing, health monitoring, and the contract compilation pipeline.
🔗 Related Issue(s)
🎯 Type of Change
📝 Changes Made
indexer/src/utils/parallel.tsprovidingparallelBatch(concurrency-limited execution) andparallelAll(timing-aware Promise.all wrapper).HorizonServiceto fetch ledgers in parallel batches (concurrency: 10), reducing backfill time by ~90%.IndexerServiceto process events in parallel batches (concurrency: 20) during historical backfill.EventProcessorServiceforhandleContentMintedEventandhandleOwnershipTransferredEvent.handleRewardClaimedEvent.HealthService(DB, Horizon, State).BackupService(audit trails, integrity metrics).scripts/build.shto detect and compile all contracts in parallel using background processes, drastically reducing total build time on multi-core systems.scripts/benchmark_parallel.shand unit tests for the parallel utility.🧪 Testing
✅ Pre-Merge Checklist (Required)
parallel.spec.tsand verified the utility logic.📋 Test Results
📊 Performance Impact
HealthandDashboardendpoint latencies reduced by ~50% due to concurrent I/O.🚀 Deployment Notes
🎯 Ready for Review:
Summary of Work
build.shto leverage all available CPU cores.Promise.all,wait) to maintain data consistency and error reporting.