FROM : Mike
DATE : Mon Mar 31 21:15:19 2008
Yes, but in some cases the loop doesn't run for 10,000. It could run for
5 iterations or 100,000 depending on the # if files to delete.
There's no caveat in the docs on the use of
performSelectorOnMainThread:withObject:waitUntilDone:modes - the docs
make it sound that there are no restrictions on how often or which
selectors can be called.
In my case I only call 2 each time through the loop - one method on the
main thread to update the progress bar, one to update the message.
-m
=============
Andy Klepack wrote:
> Are you calling performSelectorOnMainThread:withObject:waitUntilDone:modes on every iteration of the tight loop? That seems like it could be terribly expensive. What if you throttle it back to every X (ten, hundred, thousand, etc) iterations? My speculation would be you're overwhelming your receiver.
>
> -Andy
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/andy.<email_removed>
>
> This email sent to andy.<email_removed>
>
DATE : Mon Mar 31 21:15:19 2008
Yes, but in some cases the loop doesn't run for 10,000. It could run for
5 iterations or 100,000 depending on the # if files to delete.
There's no caveat in the docs on the use of
performSelectorOnMainThread:withObject:waitUntilDone:modes - the docs
make it sound that there are no restrictions on how often or which
selectors can be called.
In my case I only call 2 each time through the loop - one method on the
main thread to update the progress bar, one to update the message.
-m
=============
Andy Klepack wrote:
> Are you calling performSelectorOnMainThread:withObject:waitUntilDone:modes on every iteration of the tight loop? That seems like it could be terribly expensive. What if you throttle it back to every X (ten, hundred, thousand, etc) iterations? My speculation would be you're overwhelming your receiver.
>
> -Andy
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/andy.<email_removed>
>
> This email sent to andy.<email_removed>
>






Cocoa mail archive

