1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    45
    Answers
    4
    Vote Rating
    0
    smerny is on a distinguished road

      0  

    Default Answered: panel setHeight() extremely slow

    Answered: panel setHeight() extremely slow


    responseContainer.setHeight(rowCount * 420);
    responseContainer.doLayout();

    it's taking several times (probably 10x) longer to load than if i remove the setHeight line.

    without the setHeight, the cmp's within this container overflow off the container.

    why does it take so long? is there an alternative (quicker) way to do this?

  2. Not sure why you are using setHeight... If you don't use a layout manager, the items should make the container auto height. If you do, then you should use scrolling. The doLayout will make the container redo the layout of all the items.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Not sure why you are using setHeight... If you don't use a layout manager, the items should make the container auto height. If you do, then you should use scrolling. The doLayout will make the container redo the layout of all the items.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    45
    Answers
    4
    Vote Rating
    0
    smerny is on a distinguished road

      0  

    Default


    deviceTabPanel (sencha TabPanel) contains items that have scroll: 'vertical'... one of which is responseContainer

    responseContainer contains a sidebar and a contentContainer (sencha panel).

    contentContainer is populated by rows (sencha panels) of 3 components (sencha panels)

    ---

    if i include the setHeight like in my first post, it works as desired but takes forever to load.

    if i exclude the setHeight, it loads faster but the content within contentContainer flow off the responseContainer and i am unable to scroll to overflowing rows.

  5. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    45
    Answers
    4
    Vote Rating
    0
    smerny is on a distinguished road

      0  

    Default


    i'm making the content independently scrollable and putting the doLayout on that and it seems to work well. thanks

Thread Participants: 1