Another few options:

1. Set the dataprovider to only the first 3 entries
2. Wait for complete rendering
3. Set the dataprovider to the whole list of entries and caching will do
its job

Or just set items 4-99 to not visible, and then turn them back on when
items 1-3 finish loading. (you could even bind itemRender visibility it to
a "numLoaded" variable like visibility="{numLoaded>=3}", and update
numLoaded++ on your item renderers loaded event each time and image gets
loaded}

Or use a contentCache with queueing enabled, and set maxActiveRequests to 3
(Erik solution). Note that caching itself is pretty useless (or at least
doubtfull) in your scenario and will just consume memory, so maybe you also
want to adjust contentCache cache size to 0 or 1.

Or check and fiddle with the numElements property of the dataGroup (maybe
that's what you were looking for, not sure)
https://flex.apache.org/asdoc/spark/components/DataGroup.html#propertySummary

Or make the httpService return 2 lists (only first three, and the rest) and
switch dataProvider between them once rendering of the first list is
complete

Or use two lists (3-first as "shown" and full list as "hidden"), and switch
visibility once the first one finishes rendering

Etc... etc... etc...

On Thu, Oct 12, 2017 at 8:13 AM, Alex Harui <aha...@adobe.com.invalid>
wrote:

> There are probably other options as well.  You could overlay the list with
> a single image and have the server concatenate the images into a single
> long image and send that up.  Then under the covers, you bring the
> individual images into the cache and display them in item renderers.  It
> is more work, but "magic" uses illusions like that.
>
> I'm not sure why some intermediate numbers of renderers would work better
> than the two choices "virtual = as many as are visible" or "non-virtual =
> as many as are in the data provider".  I don't recall any particular code
> that would let you control that, but I didn't go look either.  I keep
> urging you to get good data when dealing with asynchronous data problems
> instead of guessing because if you guess wrong and it starts to work on
> one computer it might not work on some other computer.
>
> HTH,
> -Alex
>
> On 10/11/17, 6:54 PM, "bilbosax" <waspenc...@comcast.net> wrote:
>
> >Thanks for the replies Erik and Alex. When I get back to my computer
> >tomorrow, I will give your suggestions a try and see how it works out.
> >This
> >is a realestate app where property images are displayed when a property is
> >clicked on, so caching beforehand really isn't an option. But I am
> >interested in trying the datagroup. What about my second second question,
> >do
> >you know if it is possible to force a certain number of itemrenderers.
> >Right
> >now, it looks like it is using 3 itemrenderers, but I feel like 6 or 7
> >would
> >be a happy medium for my situation, but I don't know if this is possible
> >either?
> >
> >Looking forward to trying datagroup.
> >
> >
> >
> >--
> >Sent from:
> >https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fapache-fle
> >x-users.2333346.n4.nabble.com%2F&data=02%7C01%7C%
> 7C611d2f3321d64995e0be08d
> >51114310c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636433700791157091&
> >sdata=bPjPls6Hn9GV1GQJEvbnGUj5dOyaxe4%2FVGF9WMIKo%2BA%3D&reserved=0
>
>

Reply via email to