Revert "Revert "Remove Startup Loading Delays and Improve Cache-First Offline Operation"" - #1834
Open
marcellogalhardo wants to merge 1 commit into
Open
marcellogalhardo wants to merge 1 commit into
marcellogalhardo wants to merge 1 commit into
Conversation
… Offline Operation""
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Revert of #1831. Restores the cache-first code to continue the review and discussion from the original pull request (#1805) and the Slack thread.
Original Description
Conference attendees often encounter congested venue networks with poor connectivity. When opening the app between presentations, users need to see the schedule immediately without waiting for network responses.
Previously, CacheFirst treated cached queries as stale and blocked screen transitions until a network request completed on launch. This caused multi-second startup delays and loading errors when offline.
This change updates CacheFirstInterceptor to emit cached data from local storage immediately with zero delay, then trigger a background network sync asynchronously.
As a result, screens render instantly using cached data, while background requests update local storage silently and ignore network failures when offline.
Rationale for Immediate Cache Rendering
key = { it.id }) minimize visible flicker by diffing items in place rather than doing a full redraw.Because of this, my intuition is that immediate cache rendering offers a significantly better UX during a live conference environment.