Hi Alex,
Thank you for your suggestion. I did use profiler to check, and yes, it was 
rendering of post that is taking most of the time. I did my best to make the 
render as light weight as possible by extending from UIComponent, but as you 
can see, the post render did not only include text and pictures, it also 
included a "list" of comments.(List within list, or list control inside another 
list's itemRenderer...I hope this is not too confusing.)

You may be right that the post renderer is inefficient, but I think there is 
just too much going on in one post render. If the post render MUST have these 
many other controls/features in it, how should I approach this design 
requirement?


--- In [email protected], Alex Harui <aha...@...> wrote:
>
> Use the profiler to see where the time is being spent.  If your attempt to 
> use List had poor scrolling it implies that your post renderer is inefficient.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of yial2
> Sent: Friday, June 19, 2009 3:50 PM
> To: [email protected]
> Subject: [flexcoders] Performance improvement recommendation
> 
> 
> 
> 
> 
> Hi everyone,
> 
> I am creating an application which is basically a flex/flash based blog 
> engine. When the application is initially loaded, it will retrieve 50 blog 
> post and display them on the first page. The problem I am having now is that 
> it takes a LONG(5 min) time to load the posts. If I decrease the posts number 
> down to 5, the load time is within an acceptable level(7 seconds). However, 5 
> posts per page is just not acceptable.
> 
> I will try my best to describe the blog post structure in the following...
> 
> 1. Each blog post can have pictures and text in it. Each post also has 
> "comments" attach to the bottom. Following is a diagram illustrating what a 
> post would look like
> ************************
> * abc dummy text *
> * (picture) *
> * xyz dummy text *
> * (picture2) (picture3)*
> ************************
> *Comment 1 *
> ************************
> ************************
> *Comment 2 *
> ************************
> ************************
> *Comment 3 *
> ************************
> 
> 2. Each post will have variable height due to different content and different 
> number of comments
> 
> Currently, I put 50 posts in a vbox, and the vbox height is set to 768. The 
> vbox wil have a vertical scroll bar for user to scroll down to see the older 
> posts. Since vbox will render "everything" before the component can be 
> visually displayed, I can understand why it takes such a long time. I have 
> tried to modify the code to use variable height "List" with custom 
> itemRenderer instead, but the scroll on the list is NOT smooth at all due to 
> itemRenderer recycle and re-render with new data.
> 
> I am running out of ideas now. Many sites(facebook, blogger, or any other 
> blog site) made this easy with PHP/.NET/HTML utilizing "div"+AJAX, but what 
> is the best approach with Flex when constructing a blog engine application? 
> Any suggestion/help will be greatly appreciated. Thanks!
>


Reply via email to