开发者

Should loaded images and text be stored in memory or retrieved each time

My app has various pins that drop onto a map and when you click on the pins you get more information about this entity.

Each time you click on the entity it retrieves the information from a web service. Should I only retrieve this information once and store it in memory or should I retrieve it each time that page lo开发者_运维知识库ads?

It's a small about of text and 3 small images?


If its just 3 small images and some text that will not change i would probably cache them in the application instead of retriving them over and over, it will provide a better user expirience in my opinion...


Also I have a Core Data application that uses images...
I tried both methods but I chose to retrieve it every time because for my goal is the best practice. However this method causes me to write some code and a lot of if and else! How Daniel said, cache each image can be a better solution for your problem because if an user would like to retrieve these images from internet but the connections isn't fast, he'll wait a lot of time...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜