17 Jan 2012 9:03 AM #1
Answered: panel setHeight() extremely slow
responseContainer.setHeight(rowCount * 420);
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?
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.
17 Jan 2012 9:08 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 email@example.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.
17 Jan 2012 9:32 AM #3
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.
17 Jan 2012 11:14 AM #4
i'm making the content independently scrollable and putting the doLayout on that and it seems to work well. thanks