Re: Is there any overhead on hidden views?
Re: Is there any overhead on hidden views?
- Subject: Re: Is there any overhead on hidden views?
- From: "Greg Herlihy" <email@hidden>
- Date: Mon, 1 May 2006 17:26:39 -0700
Actually, hidden views do incur some operational overhead, but only on
Panther and later systems (that is, OS X 10.3 and later). Prior to Panther,
hiding a view removed it from its view hierarchy. Starting with Panther,
this behavior changed. Hiding a view now marks the view as "hidden" but the
hidden view remains a member of its current view hierarchy. Therefore any
operation applied to the entire view hierarchy, such as resizing, needs to
be applied to both visible and hidden views. In other words, hidden views
are no longer "free" like they once were.
But in exchange for hidden views' overhead comes some welcome convenience:
unhiding a view on a Panther or later OS is much less of a hassle than it
used to be because the hidden view will be correctly proportioned for its
window. In contrast, when unhiding a view on a pre-Panther OS, the view
would have kept the same dimensions that it had at the time when it was
hidden - a fact which becomes something of a problem if its window has since
been resized.
Greg
----- Original Message -----
From: "John C. Randolph" <email@hidden>
To: "Eric Lin" <email@hidden>
Cc: "Cocoa-dev" <email@hidden>
Sent: Monday, May 01, 2006 1:39 AM
Subject: Re: Is there any overhead on hidden views?
On Apr 30, 2006, at 11:55 PM, Eric Lin wrote:
If I set an NSView to hidden (by calling setHidden:), is there any
operational overhead in keeping it in the view aside from the memory
that
the view takes up? Specifically, will it waste any time drawing stuff,
handling event, etc?
No.
-jcr
_______________________________________________
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
_______________________________________________
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