Re: Data not written immediately to nstextview
Re: Data not written immediately to nstextview
- Subject: Re: Data not written immediately to nstextview
- From: j o a r <email@hidden>
- Date: Thu, 18 Jan 2007 20:41:48 +0100
On Jan 18, 2007, at 11:13 AM, MANISH CHATURVEDI wrote:
I need to do all this because I want to print some of the logs
created by application...to the user in a NSTextView..........to
make him aware of what my application is doing currently...and i
not gonna write a lot of stuff to NStextview.
It sounds like you are doing a lengthy operation in the main thread
(the "UI thread") of the application? This is typically not a good
design, as the user will be prevented from interacting with the
application for the duration.
Common ways to resolve such problems involves threading, either
explicitly via threads that you manage yourself, or implicitly, by
using functionality provide by Apple, where they manage the threads
for you (like the NSURL loading classes).
will that minimal logging also cause significant performance issue?
No, certainly not.
also when we call NSLog to write to console log, data is written
there immediatly...does it also causes performance degradation...i
have used a lot of NSLog in my app?
Logging to files are typically considered slow, but slow is a
relative statement and if it's a problem or not depends on your
application.
Finally, I have to agree with Michael Watson - Please disable all
NSLog statements before you ship your application, as there are many
users who are trying to make good use of the warnings & errors that
can be found in the Console, and since this is not possible if the
Console is spammed with debug logs.
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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