refactor(greader): incrementally fetch the unread items by difference set #570
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.
This is a reference to Reeder's synchronization logic, which syncs well across multiple devices. The following link contains other great synchronization logic, but it was not adopted due to the solidified domain model of this application.
During the initial synchronization, it fetches all articles from the past month to provide users with a better multi-device experience. However, during subsequent synchronizations (
n
-th time), it only fetches items that have differences between the local device and the server, reducing network requests. Currently, the synchronization time is mainly blocked on replacing the database records of subscription list, which can be addressed later by revising the model. The primary method of data exchange currently relies on in-memory operations, which might not be very friendly for low-memory devices. Utilizing an database intermediate table for data exchange could resolve this issue. However, the application currently consumes excessive connection pools, resulting in a lagging experience for high-memory devices. We look forward to addressing these issues through model refactoring in future iterations.