objective c - iOS PFBatchFaultingArray - causing bad UITableView performance(?) -


i use core data nsfetchresultcontroller in 1 of apps. i'm looking ways improve performance, , 1 problem have uitableviewcontroller. it's bit jaggery. i've used instruments time profiler , found following:

enter image description here

it seem called following method:

- (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath {     [...]     post *cellpost = [self.fetchedresultscontroller objectatindexpath:indexpath];     [...] } 

i wonder if there way solve this? or can else causing performance hiccup?

pfbatchfaultingarray kind of array executing fetch configured [fetchrequest setfetchbatchsize:20]; (or number > 0). acts regular array, it's -objectatindex: method fetch fetchbatchsize-ed group of objects disk if needed. can slow, keep memory usage low, because fetchbatchsize many objects need in memory, not [array count] many.

you try configuring fetch request batch size of 0, disable this. sure can fit objects need in memory.

optimizing app's core data performance may lot more involved 1 change, though! there's overview of techniques in core data best practices (2012 wwdc session).


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -