Re: Problem with NSUserDefaultsController
Re: Problem with NSUserDefaultsController
- Subject: Re: Problem with NSUserDefaultsController
- From: Keary Suska <email@hidden>
- Date: Tue, 02 Sep 2008 12:03:06 -0600
- Thread-topic: Problem with NSUserDefaultsController
9/2/08 11:04 AM, also sprach email@hidden:
>> Some other suggestions: storing the shared defaults and controller is really
>> just a waste of memory. They won't change across invocations.
>
>
> With the overhead of Objective C messaging, isn't it more efficient
> to obtain once and store the shared defaults and controller for later
> use? Admittedly, we're probably splitting hairs here with a very
> small number of messages vs very small memory requirement, but I was
> always taught that space is cheaper than time. If necessary, space
> can be reclaimed whereas (cpu) time can't.
Yes, and it really is splitting hairs, but I would caution against engaging
in "premature optimization"
<http://en.wikipedia.org/wiki/Optimization_(computer_science)#When_to_optimi
ze>.
I would, however, beg to differ on space vs time. CPU is "reclaimed" a
million times per second or more; memory is only reclaimed on occasion (when
explicitly freed). I would assert that generally, memory will have a longer
persistence time than CPU usage--CPU spikes and falls often, but memory
tends to stay constant (or gradually increase), generally speaking. It all
boils down to user experience, in any case.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden