stripe-sync-engine icon indicating copy to clipboard operation
stripe-sync-engine copied to clipboard

Stream items during backfill instead of collecting all first

Open cescox opened this issue 1 year ago • 1 comments

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.

cescox avatar Dec 02 '25 05:12 cescox

: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:

github-actions[bot] avatar Dec 02 '25 06:12 github-actions[bot]