-
Notifications
You must be signed in to change notification settings - Fork 3
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
Change the want list to work in on demand mode #15
Conversation
After this change the Swift code can request blobs to be downloaded and the blobs remain in the want list for a specific amount of time. This replace the previous approach of downloading all blobs right away and copies the current behaviour exhibited by go-ssb. The new code behaves slightly better as the want list isn't cleared when application exists and is persisted.
5b682bc
to
977a59e
Compare
if now.After(until) { | ||
toDelete = append(toDelete, id) | ||
return nil | ||
} |
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'm wondering if we could somehow make the cleanup part independent to make reads faster. Maybe we should not care about cleaning up at this point and add it later as an independent process, along with removing blobs from the disk?
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.
Or we can leave it as it is for now, and add a point to #1 to take care of it later.
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 added a point to #1 already as I think this is good enough for now as it "kinda works" but I definitely want to fix this soon.
Co-authored-by: Grzegorz Burzyński <[email protected]>
Co-authored-by: Grzegorz Burzyński <[email protected]>
After this change the Swift code can request blobs to be downloaded and the blobs remain in the want list for a specific amount of time. This replace the previous approach of downloading all blobs right away and copies the current behaviour exhibited by go-ssb. The new code behaves slightly better as the want list isn't cleared when application exists and is persisted.
After this change the Swift code can request blobs to be downloaded and
the blobs remain in the want list for a specific amount of time. This
replace the previous approach of downloading all blobs right away and
copies the current behaviour exhibited by go-ssb. The new code behaves
slightly better as the want list isn't cleared when application exists
and is persisted.