Re: Increasing stack size of NSDocument's open file thread
Re: Increasing stack size of NSDocument's open file thread
- Subject: Re: Increasing stack size of NSDocument's open file thread
- From: Quincey Morris <email@hidden>
- Date: Fri, 7 Jul 2017 01:08:19 -0700
On Jul 6, 2017, at 22:34 , Graham Cox <email@hidden> wrote:
>
> So… unless someone has any bright ideas (or has even read this, very
> unlikely), I’ll ponder some more.
You didn’t look into Jens’s first suggestion: “This.” In other words, keep the
recursion but use more than one thread.
What suggested itself to me is, after a certain recursion depth, do a sync
dispatch to another background queue to compute the rest of the subtree. That
splits the work across multiple threads. Or, you could do something similar
with a series of NSOperations, I think. The trick is to make sure you don’t do
something that confuses the NSDocument mechanism, or don’t introduce a
deadlock. (I assume that the nesting might be deep, but each level has limited
need for state from other levels, except for the results of unarchiving?)
_______________________________________________
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