I am currently developing an Android app and facing a challenge with fetching data from an API (whose data will likely not be updated in the upcoming years). The data is successfully retrieved and displayed, but the process sometimes takes several seconds, leading to a poor user experience.
I’ve been researching potential solutions and came across two approaches that seem promising, but I’m unsure which would be better for my use case:
Implementing a cache: It would prevent fetching the same data multiple times in a short period. However, data never accessed or not for a while would still require fetching, which might not fully solve the delay issue.
Bundling the data with the app: All the necessary API data would be included as a local, read-only resource (e.g., in a JSON, CSV or TXT file). However, the dataset I need being approximately 15,000 rows with 13 fields each, I’m concerned this approach might impact the app’s performance or efficiency.
Given my scenario, which solution would be more appropriate? Are there any other alternatives I should consider to optimize data loading and improve the user experience?
I am currently developing an Android app and facing a challenge with fetching data from an API (whose data will likely not be updated in the upcoming years). The data is successfully retrieved and displayed, but the process sometimes takes several seconds, leading to a poor user experience.
I’ve been researching potential solutions and came across two approaches that seem promising, but I’m unsure which would be better for my use case:
Implementing a cache: It would prevent fetching the same data multiple times in a short period. However, data never accessed or not for a while would still require fetching, which might not fully solve the delay issue.
Bundling the data with the app: All the necessary API data would be included as a local, read-only resource (e.g., in a JSON, CSV or TXT file). However, the dataset I need being approximately 15,000 rows with 13 fields each, I’m concerned this approach might impact the app’s performance or efficiency.
Given my scenario, which solution would be more appropriate? Are there any other alternatives I should consider to optimize data loading and improve the user experience?
Using the cache and provide feedback to the user on the UI as the data is fetched