You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Alex Harui <ah...@adobe.com.INVALID> on 2018/04/09 16:21:03 UTC

Re: Layout optimizations

Hi Harbs,

I was merging these changes into MXRoyale and discovered some things that
aren't PAYG.  Measurement should not be assumed on every component.  Many
components will be fine without ever requiring measurement.  There were
already some measurement beads around.  Measurement should be its own
subsystem.  I'm commenting out these assumptions in the MXRoyale branch
for now so we can continue with the emulation components.

Thanks,
-Alex

On 3/29/18, 1:28 PM, "Harbs" <ha...@gmail.com> wrote:

>Great. :-)
>
>> On Mar 29, 2018, at 11:24 PM, Carlos Rovira <ca...@apache.org>
>>wrote:
>> 
>> Hi,
>> 
>> I rebase jewel branch and updated my local UIBase with the new changes
>>and
>> all seems to work properly.
>> 
>> thanks
>


Re: Layout optimizations

Posted by Alex Harui <ah...@adobe.com.INVALID>.

On 4/9/18, 10:42 AM, "Harbs" <ha...@gmail.com> wrote:

>1. I will consider #1. There might be a way to inject those values.

The only reasons to put properties on UIBase is for MXML, and for making
components look a bit more Flex-like.  Those getters/setters often access
a bead anyway (and should).  Remember the "exploded component" discussion?
 The top-level components are really wrappers for beads.  Most app
developers do not access measuredWidth/Height.

>2. The only thing I’ve done with LayoutBase is remove code on the JS
>side. Measurement is *NOT* assumed. Not sure what you mean here.

There were some COMPILE::SWF blocks in LayoutBase assuming UIBase had
measuredWidth/Height properties.  I didn't see any checking to see if
those properties really needed to be read.  If a host is being sized by
its parent instead of sized by content, the measurements should not matter.

>3. Beads are not a bad idea, but I’d really like to find a cheaper way of
>getting beads by type than we currently have.

Beads are one pattern we use for PAYG.  Not using beads implies code that
isn't PAYG.  It would be great if there was a cheaper way of getting the
bead.  Maybe you can find some optimizations there.

Thanks,
-Alex
>
>> On Apr 9, 2018, at 8:29 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>> 
>> You can see the areas I commented out or removed in the MXRoyale branch.
>> 
>> 1) There is no need for slots for measuredWidth/measuredHeight on
>>UIBase.
>> 2) LayoutBase should not assume each host needs measuring or cares that
>> its measurements might change.
>> 3) The measurement, when needed, should be generated by loading a bead
>>and
>> asking the bead for the measurement.
>> 
>> If our examples have been working fine, then we should really think hard
>> before adding weight to those simple examples.
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 4/9/18, 10:20 AM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> Can you be more specific?
>>> 
>>> What isn’t PAYG? The measuredWidth and measuredHeight setters and
>>> getters. I can’t think of anything else.
>>> 
>>> I expect to get back to this later this week.
>>> 
>>>> On Apr 9, 2018, at 7:21 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>>wrote:
>>>> 
>>>> Hi Harbs,
>>>> 
>>>> I was merging these changes into MXRoyale and discovered some things
>>>> that
>>>> aren't PAYG.  Measurement should not be assumed on every component.
>>>> Many
>>>> components will be fine without ever requiring measurement.  There
>>>>were
>>>> already some measurement beads around.  Measurement should be its own
>>>> subsystem.  I'm commenting out these assumptions in the MXRoyale
>>>>branch
>>>> for now so we can continue with the emulation components.
>>>> 
>>>> Thanks,
>>>> -Alex
>>>> 
>>>> On 3/29/18, 1:28 PM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> Great. :-)
>>>>> 
>>>>>> On Mar 29, 2018, at 11:24 PM, Carlos Rovira
>>>>>><ca...@apache.org>
>>>>>> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I rebase jewel branch and updated my local UIBase with the new
>>>>>>changes
>>>>>> and
>>>>>> all seems to work properly.
>>>>>> 
>>>>>> thanks
>>>>> 
>>>> 
>>> 
>> 
>


Re: Layout optimizations

Posted by Harbs <ha...@gmail.com>.
1. I will consider #1. There might be a way to inject those values.
2. The only thing I’ve done with LayoutBase is remove code on the JS side. Measurement is *NOT* assumed. Not sure what you mean here.
3. Beads are not a bad idea, but I’d really like to find a cheaper way of getting beads by type than we currently have.

> On Apr 9, 2018, at 8:29 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> You can see the areas I commented out or removed in the MXRoyale branch.
> 
> 1) There is no need for slots for measuredWidth/measuredHeight on UIBase.
> 2) LayoutBase should not assume each host needs measuring or cares that
> its measurements might change.
> 3) The measurement, when needed, should be generated by loading a bead and
> asking the bead for the measurement.
> 
> If our examples have been working fine, then we should really think hard
> before adding weight to those simple examples.
> 
> My 2 cents,
> -Alex
> 
> On 4/9/18, 10:20 AM, "Harbs" <ha...@gmail.com> wrote:
> 
>> Can you be more specific?
>> 
>> What isn’t PAYG? The measuredWidth and measuredHeight setters and
>> getters. I can’t think of anything else.
>> 
>> I expect to get back to this later this week.
>> 
>>> On Apr 9, 2018, at 7:21 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>>> 
>>> Hi Harbs,
>>> 
>>> I was merging these changes into MXRoyale and discovered some things
>>> that
>>> aren't PAYG.  Measurement should not be assumed on every component.
>>> Many
>>> components will be fine without ever requiring measurement.  There were
>>> already some measurement beads around.  Measurement should be its own
>>> subsystem.  I'm commenting out these assumptions in the MXRoyale branch
>>> for now so we can continue with the emulation components.
>>> 
>>> Thanks,
>>> -Alex
>>> 
>>> On 3/29/18, 1:28 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> Great. :-)
>>>> 
>>>>> On Mar 29, 2018, at 11:24 PM, Carlos Rovira <ca...@apache.org>
>>>>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I rebase jewel branch and updated my local UIBase with the new changes
>>>>> and
>>>>> all seems to work properly.
>>>>> 
>>>>> thanks
>>>> 
>>> 
>> 
> 


Re: Layout optimizations

Posted by Alex Harui <ah...@adobe.com.INVALID>.
You can see the areas I commented out or removed in the MXRoyale branch.

1) There is no need for slots for measuredWidth/measuredHeight on UIBase.
2) LayoutBase should not assume each host needs measuring or cares that
its measurements might change.
3) The measurement, when needed, should be generated by loading a bead and
asking the bead for the measurement.

If our examples have been working fine, then we should really think hard
before adding weight to those simple examples.

My 2 cents,
-Alex

On 4/9/18, 10:20 AM, "Harbs" <ha...@gmail.com> wrote:

>Can you be more specific?
>
>What isn’t PAYG? The measuredWidth and measuredHeight setters and
>getters. I can’t think of anything else.
>
>I expect to get back to this later this week.
>
>> On Apr 9, 2018, at 7:21 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>> 
>> Hi Harbs,
>> 
>> I was merging these changes into MXRoyale and discovered some things
>>that
>> aren't PAYG.  Measurement should not be assumed on every component.
>>Many
>> components will be fine without ever requiring measurement.  There were
>> already some measurement beads around.  Measurement should be its own
>> subsystem.  I'm commenting out these assumptions in the MXRoyale branch
>> for now so we can continue with the emulation components.
>> 
>> Thanks,
>> -Alex
>> 
>> On 3/29/18, 1:28 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> Great. :-)
>>> 
>>>> On Mar 29, 2018, at 11:24 PM, Carlos Rovira <ca...@apache.org>
>>>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I rebase jewel branch and updated my local UIBase with the new changes
>>>> and
>>>> all seems to work properly.
>>>> 
>>>> thanks
>>> 
>> 
>


Re: Layout optimizations

Posted by Harbs <ha...@gmail.com>.
Can you be more specific?

What isn’t PAYG? The measuredWidth and measuredHeight setters and getters. I can’t think of anything else.

I expect to get back to this later this week.

> On Apr 9, 2018, at 7:21 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> Hi Harbs,
> 
> I was merging these changes into MXRoyale and discovered some things that
> aren't PAYG.  Measurement should not be assumed on every component.  Many
> components will be fine without ever requiring measurement.  There were
> already some measurement beads around.  Measurement should be its own
> subsystem.  I'm commenting out these assumptions in the MXRoyale branch
> for now so we can continue with the emulation components.
> 
> Thanks,
> -Alex
> 
> On 3/29/18, 1:28 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> Great. :-)
>> 
>>> On Mar 29, 2018, at 11:24 PM, Carlos Rovira <ca...@apache.org>
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> I rebase jewel branch and updated my local UIBase with the new changes
>>> and
>>> all seems to work properly.
>>> 
>>> thanks
>> 
>