Skip to content

Feat/reducing infrastructure costs#486

Merged
gabito1451 merged 8 commits into
GalactiGuild:mainfrom
T-kesh:feat/reducing-infrastructure-costs
Apr 28, 2026
Merged

Feat/reducing infrastructure costs#486
gabito1451 merged 8 commits into
GalactiGuild:mainfrom
T-kesh:feat/reducing-infrastructure-costs

Conversation

@T-kesh
Copy link
Copy Markdown
Contributor

@T-kesh T-kesh commented Apr 26, 2026

This update significantly optimizes the blockchain indexer's resource efficiency by introducing a stream-based processing architecture and offloading CPU-intensive XDR decoding to background worker threads. By replacing full batch collection with an asynchronous generator and implementing a centralized ParserService, the system now processes ledger events in manageable batches, which reduces the operational memory floor to under 500MB and eliminates the risk of Out-of-Memory (OOM) crashes during high-volume indexing. Additionally, the refactor cleans up redundant module registrations and includes batch-parsing optimizations to minimize inter-process communication overhead, ensuring the indexer remains both performant and cost-effective under heavy network load.
closes #409

- Create ParserService and parser.worker.ts for background XDR parsing

- Refactor IndexerService to use async generator for stream-based event fetching

- Implement batch parsing optimization to reduce IPC overhead

- Fix duplicated class definition and refactor SorobanEventIndexerService

- Optimize IndexerModule and add unit tests
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@T-kesh 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! 🚀

Learn more about application limits

@gabito1451
Copy link
Copy Markdown
Contributor

conflicts @T-kesh

@gabito1451 gabito1451 merged commit 2d339b3 into GalactiGuild:main Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize 'Event Parsing' Memory Usage

2 participants