How do you work with individual streams receiving data in iOS?

Hi, I am creating an application with the following properties:

  • uses master data for storage
  • has a feed that displays one item at a time
  • If from the elements the application will call the server asynchronously

It has been proven that processing asynchronous sampling is quite complicated.

Currently, we store items received from the server directly in Core Data.

Every time an application needs a new element, we request Core Data for an invisible element.

We are seeing some significant impacts on application performance due to this ongoing request for Core Data.

We thought about using the array in memory and keeping the index in it, but the asynchronous aspect of the installation after we left the element is too complicated, because we must use locks and other concurrency measures to keep the array safe flow.

Do you have any suggestions on how to reduce overall calls to Core Data?

+5
source share
1 answer

You need to keep your trips in permanent storage to a minimum in order to get a reasonable amount of the items you expect to display. The master data is very effective at failures of managed objects, so the memory footprint should not be a problem.

When you run out of elements to display, but they still have leftovers in the array, try and select a few more.

, , , , , .

.

0

All Articles