Massively improve findFile performance #728
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please see #705 for a technical discussion of the issue being solved here. This is a follow-on to tachiyomiorg/UniFile#2, which uses the newly optimized version of UniFile and adjusts
findFile
callsites to adapt to the removedignoreCase
argument.As per standard development procedure, this branch can be compiled using
./gradlew assembleDevDebug
and installed for testing. I have temporarily configuredlibs.versions.toml
to pull the specific commit from my UniFile branch via JitPack, but this will of course be updated to point to the official repository master branch once the other pull request is merged (and/or the repository, which still lives under the legacytachiyomiorg
organization, is moved undermihonapp
).If you wish to test your own changes to UniFile without pushing to GitHub, the following procedure can be used:
./gradlew assembleDebug
, using Java 11 because Java 17 is too recent (e.g. on Ubuntu with the relevant packages installed setJAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
).unifile
version pin inlibs.versions.toml
to ensure that no part of the build accidentally pulls from the published version.implementation(libs.unifile)
in projectbuild.gradle.kts
files and replace them withimplementation(files("/path/to/UniFile/library/build/outputs/aar/library-debug.aar"))
based on your dev environment's setup../gradlew assembleDevDebug
, using this time Java 21.uber-apk-signer --overwrite --allowResign -a app/build/outputs/apk/dev/debug/app-dev-arm64-v8a-debug.apk
or equivalent, I found that this was necessary because for some reason the default Gradle APK signing would change signature every time the UniFile dependency JAR was rebuilt, leading to a wipe of user data on each app installation.DCO statement: The contribution was created in whole by Radian LLC, which attests its right to submit it to the project under the terms of the Apache License.