-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Refactor service ISizeProvider to Backend #9288
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
Refactor service ISizeProvider to Backend #9288
Conversation
This looks good. Could you just clarify the need for DrivesSizeProvider? The time for retrieving a value from a Dictionary does not depends on the size of the Dictionary.
|
@gave92 Regarding the speed of reading a dictionary, I don't know if the size decreases the performance. I guess so, but let's say no. Another reason is to be able to use a different implementation depending on the drive. I am currently working on another implementation of ISizeProvider which stores data persistently in an sqlite database. I was able to get a unique guid (recent commit) but there are cases where it doesn't work, e.g. network disk in linux. A solution to this problem may exist. My idea is to use for each drive one of the 2 implementations (persistent or not). A single instance can be used for each of the 2 implementations. Soon DrivesSizeProvider will use a service to get the correct implementation for each drive. |
Sounds good, for the database you may want to look at LiteDB which is how file tags are stored instead of SQLite. |
@gave92 I fixed a problem in this already approved pr. The cache could be cleared unnecessarily. I try LiteDB. |
Hmm |
The service IFolderSizeProvider is refactored and moved to backend.
Thanks to @gave92 for fixing and improving this code. All of these improvements are retained.