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
File caching alternative #1992
File caching alternative #1992
Conversation
@gsantner This PR is ready for review. Everything seems to be working. |
@@ -0,0 +1,122 @@ | |||
package net.gsantner.opoc.util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the other opoc files, please add the public domain/cc0 header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied one and changed the name. Please modify as desired.
Sorry to say, but with the changes sorting often works not, or even the folder is not loaded. What I have found:
screenrecord-2023-03-17_19.33.54.webmOverall I think it's a quite different approach and it has potential to fail miserably, but on the other side can improve search sort/comparision performance a lot (when compared to fetching file details directly and making disk i/o for every single bit of info of a file) |
Hmmm, I am not able to reproduce any of this and it has been working consistently on my phone for quite a while now. Investigating |
Can I give some info thats helpful? I can also look more into it if I find some time on weekend |
|
Please also try the version I just pushed up. |
Pushing up another test where I use list keys instead of padded strings. All of these approaches work well for me. Just trying different things. If you could debug and see what is happening to you then that would be great too. |
8fb5f41
to
bdc7f6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked better now after the changes!
Thank you, merging it 👍🏻 🎉 !
@harshad1 |
In this PR I remove the cached version of File as it could cause problems.
In order to maintain high sort performance, I have added a key based comparison (inspired by how modern python does sorting).