Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 1, 2025

Closes #322

Applied changes based on Issue #322.

I’ve updated downloadImages to fetch in parallel with a fixed concurrency of 5, preserving the original URL order and still logging per-image successes or failures.

Summary of changes:

• Introduce a concurrency = 5 constant and split the URL list into batches.
• Within each batch, kick off all downloads via Promise.all, rather than awaiting each one in sequence.
• Collect results into a fixed-length array so that download paths stay in the same order as the input URLs.
• Filter out any failed downloads before returning the final array of relative paths.

With this change, you’ll get up to 5 simultaneous downloads, greatly reducing total download time on large image sets without adding any new dependencies. Let me know if you’d like the concurrency to be configurable or have any other tweaks in mind!

@YiweiShen YiweiShen merged commit 2724587 into main Jul 1, 2025
@YiweiShen YiweiShen deleted the codez-chore-322-feat-images-parallelize-image-downloads-3025520416 branch July 1, 2025 21:28
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.

Parallelize image downloads

1 participant