• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I implement labels without the overhead of an NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >RE: How can I implement labels without the overhead of an NSTextField? (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: RE: How can I implement labels without the overhead of an NSTextField?
  • Next by Date: Layered views and drawRect
  • Previous by thread: RE: How can I implement labels without the overhead of an NSTextField?
  • Next by thread: RE: How can I implement labels without the overhead of an NSTextField?
  • Index(es):
    • Date
    • Thread