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

  • SEARCH
  • Home
  • 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 6319349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:47:30+00:00 2026-05-24T15:47:30+00:00

Context I have a very normal setup in my app: an NSOutlineView (backed by

  • 0

Context

I have a very normal setup in my app: an NSOutlineView (backed by an NSTreeController bound to Core Data) fills an NSTableView (backed by an NSArrayController bound to core data) based on what the user selects in the outlineView. Both controllers (and their views) are bound in the normal way —> contentSet binding on NSArrayController points to an NSSet property of the object represented by the selected row in the outlineView.

So, suppose the user selects “Folder X” in the outlineView. There are 1,200 items in “folder X”, each of which is backed by a Core Data entity and each of which is a row in the tableView.

The Problem

My app needs to change a property on each of those 1,200 entities, so I have a loop that does just that. But, EVERY time I access an entity and set a new property, the NSTreeController and NSArrayController fire off a KVO notification with the changed entity as the object of the notification. This is KILLING performance.

If nothing is selected in the outlineView, the loop completes more or less instantly. If “folder X” is selected, those KVO notifications slow the process down to ~8 seconds.

What I need

A way to STOP the controllers from firing KVO notifications, or a way to work around the issue so that updating the entities is not slower if they’re selected in an NSController.

  • 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-24T15:47:31+00:00Added an answer on May 24, 2026 at 3:47 pm

    You can use the -setPrimitiveValue:forKey: method of NSManagedObject. This will allow you to set the value of a property without triggering KVO observers.

    Note that in general, you should use the dynamically-generated accessors rather than using this method directly (for example, setPrimitiveName: instead of setPrimitiveValue:newName forKey:@"name").

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

Sidebar

Related Questions

Context: I have a WPF App that uses certain unmanaged DLLs in the D:\WordAutomation\MyApp_Source\Executables\MyApp
Context : A rails app with authlogic for sigup and login Setup info: Rails
I have two apps. One is a very simple app that I built with
I have a very tricky problem going on with content inside a textarea on
We have a very simple ASP.NET web application comprising mostly static content and a
I have UITableView with very large cells with lots of content (more than one
Context We have a SharePoint site set up on a Windows Server 2008 VM
Setting up ASP.net MVC with Linq2SQL or Entity Framework's context to have scaffolding work
I have a context loader class which loads an XML file with info on
I have a LINQ TO SQL Context that I have created that calls a

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.