Nested groups

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Nested groups

Mike Kerner via use-livecode
Curiosity question: Do multiple nested groups (3 or 4 levels deep)
affect CPU and memory performance? Are fewer nested groups easier on the
engine?

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
J. Landman Gay wrote:

 > Curiosity question: Do multiple nested groups (3 or 4 levels deep)
 > affect CPU and memory performance? Are fewer nested groups easier
 > on the engine?

Because they effectively deepen the message path, I'd wager there is
some difference, at least in terms of initializing the message path as
the objects are unpacked before preOpenCard.

That said, given the speed of the natural message path I'd wager it
would be small enough to be unnoticeable, and perhaps even difficult to
measure.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
On 2/7/17 2:13 PM, Richard Gaskin via use-livecode wrote:

> J. Landman Gay wrote:
>
>> Curiosity question: Do multiple nested groups (3 or 4 levels deep)
>> affect CPU and memory performance? Are fewer nested groups easier
>> on the engine?
>
> Because they effectively deepen the message path, I'd wager there is
> some difference, at least in terms of initializing the message path as
> the objects are unpacked before preOpenCard.
>
> That said, given the speed of the natural message path I'd wager it
> would be small enough to be unnoticeable, and perhaps even difficult to
> measure.
>

I was thinking about the amount of redrawing the engine would need to do
to render them.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
On 2/7/2017 5:01 PM, J. Landman Gay via use-livecode wrote:

> On 2/7/17 2:13 PM, Richard Gaskin via use-livecode wrote:
>> J. Landman Gay wrote:
>>
>>> Curiosity question: Do multiple nested groups (3 or 4 levels deep)
>>> affect CPU and memory performance? Are fewer nested groups easier
>>> on the engine?
>>
>> Because they effectively deepen the message path, I'd wager there is
>> some difference, at least in terms of initializing the message path as
>> the objects are unpacked before preOpenCard.
>>
>> That said, given the speed of the natural message path I'd wager it
>> would be small enough to be unnoticeable, and perhaps even difficult to
>> measure.
>>
>
> I was thinking about the amount of redrawing the engine would need to
> do to render them.
>

I have a number of stack with a lot of controls in multiple nested
groups. For me, the groups are primarily for organizing objects on the
card so I can find what I am looking for as a developer. OR when I want
to move a set of related control around. In all such cases, I have never
noticed a visible difference in rendering of the cards vs card with few
groups or fewer controls in a similar number of groups.

This is just human perception. I have never timed renderings to compare.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
On 2/7/17 4:07 PM, Paul Dupuis via use-livecode wrote:

> On 2/7/2017 5:01 PM, J. Landman Gay via use-livecode wrote:
>> On 2/7/17 2:13 PM, Richard Gaskin via use-livecode wrote:
>>> J. Landman Gay wrote:
>>>
>>>> Curiosity question: Do multiple nested groups (3 or 4 levels deep)
>>>> affect CPU and memory performance? Are fewer nested groups easier
>>>> on the engine?
>>>
>>> Because they effectively deepen the message path, I'd wager there is
>>> some difference, at least in terms of initializing the message path as
>>> the objects are unpacked before preOpenCard.
>>>
>>> That said, given the speed of the natural message path I'd wager it
>>> would be small enough to be unnoticeable, and perhaps even difficult to
>>> measure.
>>>
>>
>> I was thinking about the amount of redrawing the engine would need to
>> do to render them.
>>
>
> I have a number of stack with a lot of controls in multiple nested
> groups. For me, the groups are primarily for organizing objects on the
> card so I can find what I am looking for as a developer. OR when I want
> to move a set of related control around. In all such cases, I have never
> noticed a visible difference in rendering of the cards vs card with few
> groups or fewer controls in a similar number of groups.
>
> This is just human perception. I have never timed renderings to compare.

Thanks. I'm working with a stack that has some memory issues which
includes many image-rich nested groups. I don't think this is
contributing directly to the problem but wondered if reducing the number
of groups might help.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
On 2/7/2017 5:19 PM, J. Landman Gay via use-livecode wrote:

> On 2/7/17 4:07 PM, Paul Dupuis via use-livecode wrote:
>> On 2/7/2017 5:01 PM, J. Landman Gay via use-livecode wrote:
>>> On 2/7/17 2:13 PM, Richard Gaskin via use-livecode wrote:
>>>> J. Landman Gay wrote:
>>>>
>>>>> Curiosity question: Do multiple nested groups (3 or 4 levels deep)
>>>>> affect CPU and memory performance? Are fewer nested groups easier
>>>>> on the engine?
>>>>
>>>> Because they effectively deepen the message path, I'd wager there is
>>>> some difference, at least in terms of initializing the message path as
>>>> the objects are unpacked before preOpenCard.
>>>>
>>>> That said, given the speed of the natural message path I'd wager it
>>>> would be small enough to be unnoticeable, and perhaps even
>>>> difficult to
>>>> measure.
>>>>
>>>
>>> I was thinking about the amount of redrawing the engine would need to
>>> do to render them.
>>>
>>
>> I have a number of stack with a lot of controls in multiple nested
>> groups. For me, the groups are primarily for organizing objects on the
>> card so I can find what I am looking for as a developer. OR when I want
>> to move a set of related control around. In all such cases, I have never
>> noticed a visible difference in rendering of the cards vs card with few
>> groups or fewer controls in a similar number of groups.
>>
>> This is just human perception. I have never timed renderings to compare.
>
> Thanks. I'm working with a stack that has some memory issues which
> includes many image-rich nested groups. I don't think this is
> contributing directly to the problem but wondered if reducing the
> number of groups might help.
>

My guess is it is more probably related to the number of images than the
number of groups. I am NOT very knowledgeable about all the details of
image optimization in LiveCode, but there are people on the list who are.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Nested groups

Mike Kerner via use-livecode
In reply to this post by Mike Kerner via use-livecode
J. Landman Gay wrote:

 >> On 2/7/2017 5:01 PM, J. Landman Gay via use-livecode wrote:
 >>>>> Curiosity question: Do multiple nested groups (3 or 4 levels deep)
 >>>>> affect CPU and memory performance? Are fewer nested groups easier
 >>>>> on the engine?
...
 > I'm working with a stack that has some memory issues which includes
 > many image-rich nested groups. I don't think this is contributing
 > directly to the problem but wondered if reducing the number of
 > groups might help.

For both performance and memory, each object adds some overhead.  But
the group object would seem slim in both respects, so I wouldn't imagine
an extra level of nesting would make much difference either performance
or RAM.

Images, however, are among the most RAM-intensive objects LC handles.
Each exists at least initially in its compressed form, then in its
unpacked bitmap form when rendered (width * height * color depth,
possibly also + alpha width * height if PNG), and often both exist at
the same time.

If there's a way to reduce the number of images, or their size, or their
quality (if JPEG), you'll likely get much farther with reducing memory
requirements than by removing groups.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode