Repository navigation
IO: Improve scan performance with Root & Shizuku - #1000
Merged
Merged
Conversation
Perform path tree walking at lower access levels (i.e. SAF & Local(Normal/ADB/Root)). This reduces overhead and in allows for more optimization. In the case of ADB/Shizuku and Root this reduces the back and forth between processes and through the IPC buffer: Instead of multiple and repeated `lookupFiles` between SD Maid and the Shizuku/Root process, we only have one call and return the list of of all nested files. The downside is that we can't use filters with anonymous functions anymore as we can't pass those through the IPC buffer.
…in` filters can be passed through the IPC. This allows some scanners like AppScanner to also work with the faster `direct` walking.
…ad()` Just like with LocalPath.listFiles, we can't rely on just `canRead` as this return `true` even if `listFiles` will throw an exception.
This comment was marked as spam.
This comment was marked as spam.
…s if top level folders return `canRead=true` but subdirectories don't
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Less back and forth between SD Maid and root/shizuku processes when traversing nested directories. If we handle all the traversing on one side (in one process) then we don't have to proxy extra calls for each directory through the IPC buffer. 🥳
TODO: Some of the access type mechanisms fail when with this optimisation, i.e. tries NORMAL, but not ADB when in
Mode.AUTO🤔