-
Notifications
You must be signed in to change notification settings - Fork 80
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
Speed up SAF 100x #372
Speed up SAF 100x #372
Conversation
That sounds quite good 🤩 |
b19fbd3
to
4895b06
Compare
After seeing #205, I will experiment with the non-existent-path problem. Until it is done, I mark this as draft.
|
Without change, it's ready for review again. This PR can remain as is, the "file under nonexistent folder issue" will be fixed in a new PR, because it got quite complex. |
Ok, the trick was to mix those 2 SAF APIs (DocumentFile and URL-based-API). That really improves it. And the changes are not at an end yet 😄 |
Summary:
One issue with the code below:
/valid-folder/nonexistent-folder/nonexistent-folder/file.xxx
, what should we do withnonexistent-folder
s???/valid-folder/invalid-folder
and finally a file was created with the name ofinvalid-folder
, still not a good outcome. And without any error message.UPDATE: this PR can remain as is, this issue will be fixed in a new PR, because it got quite complex
Possible better solutions:- Extend FileSystemView.getFile() with athrows Exception
and modify SftpSubsystem's code? I remember you don't like modifying the original server's code.- Create some dummy "fails on everything" SafFile+SafFtpFile+SafSshFile, and that will throw the proper FileNotFoundException on the first call? Maybe this is the most analog to what would happen on a real file-system with File. But it smells like an ugly hack.- Any idea???