Hey Bilbosax, I don't see how that setting will help. For best look and feel, I 
suggest you let the ItemRenderer do it's job which will render the visible ones 
first but use ContentCache so that the images are loaded only once, so 
scrolling will be pretty good.

That said, you might consider caching the first page of images on app startup, 
whenever you populate your ArrayCollection, assuming it's sometime before it is 
rendered, adding them to your ContentCache so the list will render fast when 
the view does become visible. 

But the idea would be to use a Loader and set the ContentCache member and 
explicitly load the first n images without displaying them. Set your renderer's 
image loader to the same ContentCache and when it first tries to render, it 
will find the image already in the cache and simply render it without making 
the Loader request.

This only works if you have time to preload the cache with the items you want 
to display first before displaying them to the user. If this isn't your 
scenario then I suggest living with the delay and just using virtualization. 
Adobe developers put a lot of time into optimizing list rendering in 
Flash/Flex, and unless you want to deep dive and recreate a lot of code, I 
doubt you'll find a simply solution. I'm an ACE from back in the Adobe Flex 
days and don't recall anything like you are asking about being supported out of 
the box.

However, another idea might be using a DataGroup which doesn't reuse renderers, 
perhaps it will render the first visible images before the rest. I have never 
tried that. But when you set a List to not reuse renderers you are essentially 
making it a DataGroup anyway. But perhaps DataGroup handles this scenario 
better? May be worth a try. Here's how you can horizontally scroll a DataGroup 
with ItemRenderer that won't recycle the renderers.
<s:Scroller width="100%">
    <s:Group width="100%" clipAndEnableScrolling="true">
        <s:DataGroup id="dataGroup" width="100%" 
itemRenderer="com.linqto.navcon.component.list.CommunityPostRenderer"
                     dataProvider="{_model.communityPosts}">
            <s:layout>
                <s:HorizontalLayout gap="0"/>
            </s:layout>
        </s:DataGroup>
    </s:Group>
</s:Scroller>
I'd be interested to know if this works better since I use a lot of lists with 
images in my various mobile apps and performance is ALWAYS a concern.

Erik

On Oct 11, 2017, at 6:39 AM, bilbosax <waspenc...@comcast.net> wrote:

I hear your logic, but I'm not sure that I follow. I make a database request
that downloads a bunch of url strings to an array collection that are in the
order that I want them displayed and the priority that I want them rendered.
After the arraycollection is populated, a component is instantiated
containing the list and the array collection is set as the data provider and
the images begin to render. The problem is that it seems that the first
three images that are initially on the screen are the LAST to be loading. If
the data provider is being set all at once, you are telling me there is no
way to force the render order from 1 to 24 instead of 24 to 1?

It sounds like you are saying whoever gets their data first will render
first, but if I just hand off the data provider, I can't control who will
have their photo delivered first so it will always be random. Is that right?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/


Reply via email to