Re: to make NSOutlineView faster
Re: to make NSOutlineView faster
- Subject: Re: to make NSOutlineView faster
- From: "Sherm Pendley" <email@hidden>
- Date: Thu, 17 Apr 2008 11:07:04 -0400
On Thu, Apr 17, 2008 at 10:48 AM, Nick Rogers <email@hidden> wrote:
> Hi,
> I have NSOutlineView display a tree of files and folders in the root "/"
> filesystem.
> I also have checkboxes in the first column.
> whenever a item is clicked, say first time, then this item and all its
> children are also marked internally.
> so the check/uncheck mechanism also works internally to check/uncheck the
> files and folders.
>
> when displaying outline view i'm not reloading the root's children.
>
> I run the app, it creates a tree of around 450000 entries in my Macintosh
> HD.
> Now when i click to check root item, it takes around 2 mins to reflect and
> show the check boxes checked.
> then I uncheck root item. And when I check again it takes around 20
> seconds and the time stays at that.
>
> This shows that my internal checking/unchecking mechanism is fast. as the
> second time the time is considerably less.
>
> Is there a way to make this checking/unchecking faster?
Maybe - you didn't include the code that's crawling through the HD, so it's
hard to say for sure.
> Is there anything that can be done to outline view to achieve this?
If the second run is 20 seconds, that suggests that it's not the outline
view that's the bottleneck. I suspect that your code that handles
(un)checking is getting information about each file as it does so, and that
on the second (and subsequent) runs it's getting cached info instead of
reading from the HD.
Any ideas?
Profile your app with Shark. It can tell you precisely where your app is
spending its time.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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