Skip to content

Modified findUniqueFileName() in UploadWorker.kt to use a random 3-di… #1

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

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

AlexG-2003
Copy link
Owner

Changed from increment to alphanumeric hash to append to a file name when file name already exists.

Fixes commons-app#2506

This improves speed over using an incrementing number to append as there are fewer collisions. Calls to check if a file name exists are slow so it is best to have as few collisions as possible. I used an alpha-numeric hash as discussed in commons-app#2506, which was voted the best option.

Tests performed (required)

Tested testBetaDebugUnitTest on Pixel 9 Pro XL with API level 35.

…git alphanumeric hash to append to a file name to make it unique. This improves speed over using an incrementing number to append as there are fewer collisions.
@AlexG-2003 AlexG-2003 self-assigned this Oct 18, 2024
@Donutcheese Donutcheese merged commit 7b96dff into improve-uniqueFileName-search Oct 19, 2024
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