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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of yial2
Sent: Friday, June 19, 2009 3:50 PM
To: flexcoders@yahoogroups.com
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