Efficiently process large datasets in Convex with batch accumulator and table iterator utilities for optimized performance.
npm install convex-batch-processorBatch processing component for Convex - batch accumulator and table iterator
The convex-batch-processor provides a table iterator that automatically handles pagination and prevents query timeouts. It processes records in configurable batch sizes, allowing you to iterate through entire tables while staying within Convex execution limits.
Use the batch accumulator to collect multiple operations and execute them efficiently. The component handles batching logic, error recovery, and ensures optimal performance when processing multiple records or performing bulk updates in Convex.
The batch processor implements proven patterns for handling large datasets in Convex. It combines table iteration with batch accumulation to process thousands of records efficiently while maintaining data consistency and handling edge cases.
The convex-batch-processor automatically manages batch sizes and execution time to stay within Convex limits. It uses pagination for table iteration and configurable batch sizes for operations, ensuring your functions don't timeout while processing large datasets.
Yes, convex-batch-processor allows you to configure batch sizes based on your specific needs. You can set different batch sizes for table iteration and operation accumulation, optimizing performance for your data patterns and processing requirements.
The convex-batch-processor includes built-in error handling and retry logic for failed operations. It can continue processing remaining batches when individual operations fail, and provides detailed error reporting to help you handle edge cases in your Convex functions.
Yes, convex-batch-processor works with any Convex table structure. The table iterator is generic and adapts to your schema, while the batch accumulator can handle any type of operation or data transformation you need to perform on your records.