On Mon, Jul 8, 2013 at 5:31 PM, Paru Somashekar <
parvathi.somashe...@oracle.com> wrote:

>
> Hi Rich,
>
>
> On 7/8/13 9:57 AM, Richard Bair wrote:
>
>>  Hi Paru, I have a few questions. The first is, why does it make a
>> difference whether the tab content is added to the scene graph or not? If a
>> node is marked visible=false, it *should* be essentially the same as not
>> being in the graph. That entire branch shouldn't be picked, etc. I don't
>> doubt that you are seeing a performance difference, but I wonder whether
>> the right answer is to fix the places in the SG (if possible) that are
>> causing this problem (perhaps, for example, layout?) rather than adding an
>> API which controls when the tab contents are added to the SG.
>>
>>  When all of the content is added to the scene graph, the RESIZE TEST
> part of the performance test suite showed lower fps as against when only
> the selected tab's content was part of the scene graph. This is because
> layout gets called for the tabs that are not currently selected /
> visible. ( confirmed that CSS does not get called however for tabs not
> visible).



Does that mean there is currently a bug computing the correct preferred
size because the CSS values for the unselected tabs is not taken into
account?

I personally would not bother optimizing this if it is simply a fact that
"doing the right thing" to compute the correct preferred size takes longer
simply because there are more nodes to layout.  The optimizations suggested
are all hacks that ultimately result in incorrect results in my opinion. If
I wanted that level of control I would code my app to add the content to
the selected tab upon selection rather than over-complicating the API of
the TabPane.  You time is better spent fixing broken stuff.

Scott

Reply via email to