Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MC-1883] File download concurrency #358

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

nzagorchev
Copy link
Contributor

Overview

Set maximum concurrent downloads. Increate the resource timeout. Wait for slow downloads to complete.

Implementation

  1. Add semaphore with max concurrent download count. Set the timeout of the semaphore to be slightly longer than the request timeout. Signal the semaphore when a request has finished so that the next one can start.
  2. Set max concurrent count to 10. Increase resource timeout to 25 seconds. Those counts are based on testing - downloading multiple files on different network speeds.
  3. Synchronize the access to the status dictionary when downloading and deleting files to prevent concurrency errors

Copy link
Contributor

@nishant-clevertap nishant-clevertap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nzagorchev nzagorchev merged commit 3b26e69 into custom_inapp_templates Aug 1, 2024
1 check passed
nzagorchev added a commit that referenced this pull request Aug 6, 2024
* [MC-1465] Custom templates define (Custom Templates Part 1) (#327)

* [MC-1467] Custom templates Sync (Custom Templates Part 2) (#329)

* [MC-1466] Custom templates data in inapp notification (Custom Templates Part 3) (#330)

* [MC-1468] Custom templates present and dismiss (Custom Templates Part 4) (#332)

* [MC-1470] Custom templates actions (Custom Templates Part 5) (#336)

* [MC-1649] Custom functions allow dictionaries (Custom Templates Part 6) (#337)

* [MC-1472] In-app actions js interface (Custom Templates Part 7) (#338)

* Implement custom templates file arguments (#348)

* Add template and template context debug descriptions (#351)

* [MC-1823] Fix html view controller presented before scene became active (#352)

* tvOS compatibility (#353)

* Add SDK version as window variable to the JS interface (#354)

* Create the syncPayload and meta outside the syncWithBlock (#356)

* Expose activeContextForTemplate (#357)

* [MC-1883] File download concurrency (#358)

* Enumerate synchronously (#359)

* Update docs, Changelog and README (#360)

* Update SPM (#362)

* Bump version to 7.0.0 (#361)
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.

2 participants