• 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: NSView; size, memory, performance issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView; size, memory, performance issues


  • Subject: Re: NSView; size, memory, performance issues
  • From: Allan Odgaard <email@hidden>
  • Date: Sun, 11 Apr 2004 00:48:20 +0200

On 10. Apr 2004, at 20:29, Ivan Kourtev wrote:

1. Does an NSView use a memory buffer for the rendering of the drawing to the screen or are all drawings buffered and displayed by the NSWindow containing the view?

The buffer is held by the window.

(via NSView methods such as frame, setFrameSize:, setBounds:, bounds, setBoundsSize:.

These methods do not mark the receiver is needing refresh, so I'd assume that they are pretty much instant.

But if you manually mark the receiver as dirty, time spent should be proportional with the complexity of the rendering done by the view in question.

2. What is the relationship between a 1x1 square of NSView area and 1 screen pixel--are they the same or is one supposed to look up some device-dependent (monitor) data for the answer?

The relationship depends on your bounds. By default, there is a one-to-one mapping in size, but there is a translation of half a pixel.

In short, how does one write code that displays things in a nearly identical dimensions regardless of specific monitor used?

What do you mean by that? Do you refer to the aspect ratio of the things you are drawing?

It would be helpful if someone could also point to a detailed reference to learn about the overall drawing system architecture (I've searched but must've missed them if there are any).

Did you read <http://developer.apple.com/documentation/Cocoa/Conceptual/DrawViews/ index.html>?

I am simply trying to learn the cost of various calls, data structures used, etc. so I can consider a balanced structure for an applications before I've actually written and tested any code for performance, memory use, and so on.

I think you'd get better help/insight if you instead describe what you are planning to do, or just wrote a prototype -- I don't spot any obvious design choices to be made based on how NSView's allocate buffers or similar... ;)






** Cocoa FAQ: <http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSView; size, memory, performance issues
      • From: Ivan Kourtev <email@hidden>
References: 
 >NSView; size, memory, performance issues (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: NSView; size, memory, performance issues
  • Next by Date: Re: How to make a transparent NSView answer events
  • Previous by thread: Re: NSView; size, memory, performance issues
  • Next by thread: Re: NSView; size, memory, performance issues
  • Index(es):
    • Date
    • Thread