stripe-sync-engine
stripe-sync-engine copied to clipboard
Stream items during backfill instead of collecting all first
Currently fetchAndUpsert collects all items into an array before upserting. For large syncs this accumulates everything in memory.
Streaming items and upserting in chunks as they arrive would reduce memory pressure during backfills.
Trade-off: The mid-sync log showing item count would be removed (we don't know the total until done). One option is per-batch logging for progress visibility, though that adds verbosity.
I'm going to open a draft PR if you'd like to review the approach.
:tada: This issue has been resolved in version 0.46.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: