Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6803225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:19:07+00:00 2026-05-26T19:19:07+00:00

I have been developing iPhone application and just started adding CoreData for persistence. However

  • 0

I have been developing iPhone application and just started adding CoreData for persistence. However I stumbled into one dilemma,

Context : I have Entity named Person, Person Entity has one Attribute name.

Task : Change name of Person object.(NSManagedObject)

Performance Test : Which option will be faster and better in matter of performance?

Option 1 : Assuming Object has been created once only

  1. Get object from CoreData
  2. Edit Object’s name
  3. Save NSManagedObjectContext.

Option 2 : Creating new Object each time.

  1. Delete previously created object
  2. Create new Object
  3. Save NSManagedObjectContext.

NOTE : I have only one attribute! Name. Imagine I have game and user are being asked for their player name. I know there is will be not much difference in performance for a such a small task. But what later if I implement in something hardcore? So for defence which one is better?

Thanks for any kind of input!


My Thoughts : Both options should be similar in matter of performance. As fetching data and than updating and saving seems similar to delete recreate and save. I want someone to prove me wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:19:08+00:00Added an answer on May 26, 2026 at 7:19 pm

    Option 1 is better because Option 2 is nutty.

    I haven’t tested the performance, but it seems highly unlikely that Option 2 would be faster, since there is overhead associated with creating an object. But even if Option 2 was marginally faster it doesn’t make logical sense as a process so it isn’t a great way to structure your code. If it continues to be the same Person you’re representing, then represent them with the same object. Anything else is just asking for headaches down the track in unexpected ways, since you’re starting off with an odd arrangement. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing one application in iPhone and I'm making custom cells for
I have been developing an iphone application using a domain model, and have put
So I have been developing against the iphone 3.0 beta's and have just gone
I have been developing a C# windows form application in XP. It all works
I have been developing an iPhone app and now I am trying to build
I have been developing an iPhone app which queries a server that relays data
I have been developing an iPad application in which I want to implement multithreading,
Coming up towards the end of developing an iPhone application and I'm wondering just
I have an application that I am developing for the iPhone. What it does
Ok I've been developing iphone-apps for over a year now, but there's this one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.