Re: How can I implement labels without the overhead of an NSTextField?
Re: How can I implement labels without the overhead of an NSTextField?
- Subject: Re: How can I implement labels without the overhead of an NSTextField?
- From: Douglas Davidson <email@hidden>
- Date: Sun, 12 Dec 2004 15:07:26 -0800
On Dec 12, 2004, at 2:54 PM, Jonathan E. Jackel wrote:
What are you talking about? I was just dragging NSTextViews from
the palette. The ones that looks like labels. Hence my complaint
that all of the labels were NSTextViews.
Well, that may be your problem. NSTextViews are fairly expensive
objects.
You want to use NSTextFields (although maybe you are doing that
already and
just don't know the difference?).
Or possibly vice versa. NSTextViews are heavyweight objects in memory
terms, but they do redraw quickly after initial layout. NSTextFields
store less state, which means that they may take longer to redraw (but
maybe not, since there is quite a bit of optimization for common types
of strings). Under the circumstances I would suspect that the real
culprit is an excess of views; using a large number of views rather
than a single custom view is going to be costly no matter what class of
view is used. However, I think the larger point here is that it is
impossible to tell given the limited details and the lack of any real
performance testing. Sampling would probably make the problem obvious
right away.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden