Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7028297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:22:07+00:00 2026-05-28T00:22:07+00:00

So updateDisplayList is for laying out, positioning and sizing a component’s children. It seems

  • 0

So updateDisplayList is for laying out, positioning and sizing a component’s children. It seems a waste to me, however, to have all that code running every time a render is called, even if no changes have been made to the relevant properties or child properties.

The way I get around this for performance’s sake (working on mobile) is to set a flag inside of my overridden updateDisplayList that lets a big part of my own sizing/positioning code run only the first time.

Is this a bad idea/ big mistake? I just can’t see the benefit to letting it run every time otherwise if I don’t expect anything that affects sizing/positioning to change.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:22:08+00:00Added an answer on May 28, 2026 at 12:22 am

    It seems a waste to me, however, to have all that code running every
    time a render is called, even if no changes have been made to the
    relevant properties or child properties.

    I agree completely.

    The way I get around this for performance’s sake (working on mobile)
    is to set a flag inside of my overridden updateDisplayList that lets a
    big part of my own sizing/positioning code run only the first time.

    What I’ve done–and is very common in the Flex Framework–is to have a property for every main item that needs to change. For example, our MX AutoCompleteComboBox has a property named “downArrowVisible” and if you set it to false it will hide the down arrow from display, while also resizing the textInput to spread across the full width of the component. If you set it to true; it will position items like the normal ComboBox.

    So, whenever the property downArrowVisible is changed, we set a flag there, downArrowVisibleChanged; and use that property to determine whether updateDisplayList should change position of the elements. [It’s slightly more complicated than that, but that is the gist]. The default of downArrowVisibleChanged is true so that during the initial setup run the children components will be sized and positioned correctly.

    This sounds very similar to what you’re doing; as I never have a flag property specific to updateDisplayList(). I make my flags specific to a certain piece of the layout, and only set those flags to ‘no longer need to be changed’ in updateDisplayList().

    Is this a bad idea/ big mistake? I just can’t see the benefit to
    letting it run every time otherwise if I don’t expect anything that
    affects sizing/positioning to change.

    I think it seems like a logical approach. You are correct, there is no need to having your layout code consistently running every time the component redraws.

    If you will not be changing properties of your custom component at runtime and only want your updateDisplayList() routine to run once–and never again–then I think you can tie into the initialized property of the Flex Framework without adding your own Boolean value. IF the value is false, then the component hasn’t been through it’s initial creation process yet. If the value is true then it has.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a BaseComponentClass that I am using as the class that all my
The things are simple, I have a component and I add some content to
I'm having one more How do I question :) Suppose I have a component
I have a Flex tree control that holds a tree full of various types
In flex component life cycle, after we make some change in a components property,
Reward: Has been claimed. Overview: The code giving me the problem is deployed here:
I'm using default drag/drop on Flex DataGrid, however, the dataGrid itself has an itemrenderer.
So I am using a jquery plug in that allows me to change the
In UI component life cycle, I heard validation and invalidation events. Please explain me
I saw someone using label as an ItemRenderer for DataGrid, the code is here.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.