Skip to content

Add an option to set UPLOAD_POOL_SIZE and DOWNLOAD_POOL_SIZE #6850

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

Open
De-Panther opened this issue Apr 8, 2025 · 1 comment
Open

Add an option to set UPLOAD_POOL_SIZE and DOWNLOAD_POOL_SIZE #6850

De-Panther opened this issue Apr 8, 2025 · 1 comment
Labels

Comments

@De-Panther
Copy link

What feature would you like to see?

Describe the feature you would like to add, ideally proposing a specific API.

I would like an option to set UPLOAD_POOL_SIZE and DOWNLOAD_POOL_SIZE, for the UPLOAD_QUEUE_EXECUTOR and DOWNLOAD_QUEUE_EXECUTOR in StorageTaskScheduler.
Currently, as I see it, those executors are initialize when Firebase is loaded, so I'm not sure where and what would be the correct place to modify those values.

How would you use it?

Tell us how you'd use this feature in your app.

One of my clients needs to upload a batch of lots of small files.
On iOS where Firebase relies on the OS for the parallel limits, it allows much more uploads at a time, and uploading all the files together is fast.

On Android, currently the limit of UPLOAD_POOL_SIZE is 2.(see this line)
Uploading the batch in Parallel on Android is faster than uploading the files one by one, but it's still 5 to 10 times slower than iOS, as the limit is too low.

Maybe there's a reason for such a low value, as it might was useful for some apps in the past, but I think that letting the developers to optimize this aspect of the app is better.

Looking for a solution, I didn't find a mentioned of this issue on Github, but I found some posts on stackoverflow, like this one that suggested to edit the source and rebuild it by ourselves.
It is possible as a last resort, but it's not sustainable to maintain it, and make it even more complicated when using the SDK in other frameworks and engines like Unity.

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants