From now on until quit I get every 100 msec one Context Switch
and two Mach
System Calls - as observed via Activity Monitor.
It's noted in the documentation that using -results is "not
recommended due to performance and memory issues".
My (Tiger) documentation says: "While it is possible to copy the
proxy array and receive a “snapshot” of the complete current query
results, it is generally not recommended due to performance and
memory issues."
(I had read this, but as I never copied the array, I thought it would
be ok.)
It continues: "you should instead use the resultCount and
resultAtIndex: methods."
Following this advice I succeeded in bringing the idle Cpu-time to 0%
in one app.
Thanks for pointing me in the right direction!
But the documentation also says: "The results array is a proxy object
that is primarily intended for use with Cocoa bindings."
And I have another app, where I never use "results" directly, but
which has an NSTableColumn bound via an NSArrayController to "results".
And this app also uses 0.2% Cpu while doing nothing.
Same behaviour in: /Developer/Examples/AppKit/Spotlighter.
Kind regards,
Gerriet.
_______________________________________________
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