Performance issue

Discussion in 'iOS Programming' started by pravara15, Oct 9, 2009.

  1. pravara15 macrumors newbie

    Joined:
    May 14, 2009
    #1
    Hi,
    I want to ask which one is faster, accessing values from local database or reading a text file, in IPhone application.:confused:
     
  2. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    In general, databases are usually going to win. Check out FMDB for a nice set of iPhone database wrappers.

    If speed is a very important factor then you're best off implementing it both ways and running tests against a realistic data set to see which is best for your particular use case.
     
  3. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #3
    Depends on how you read, how much you read, and whether you need to do any parsing/formatting/data conversion. If you just want a stream of sequential ascii characters, then the text file read probably has much less overhead. but ymmv.
     

Share This Page