4 Replies Latest reply on Feb 17, 2010 8:39 AM by monkeymagiic

    Optimizing Gumbo Itemrenderers


      Hello Adobe and fellow Flexers


      Flex 4 is great by the way, really enjoying getting into it.


      The past three months I have been building a music streaming application that needs very large amounts of visual content displayed in the list's (album/artist/song covers), this has all been running very well until a tested who has +-500 tracks within a playlist displayed on a fairly older PC.


      It appears I need some advice regarding the ItemRenderer components, currently I am using:


      1. Image


      I would assume this is not the way forward and should be using the BitmapImage (spark control) with a static loader/cache?


      2. RichText


      As nice as this text component is I would assume it is very heavy when there are a few hundred being scrolled through at any one time, what would be the lowest text element I could use while still supporting CSS with font embedding?


      3. Link Button


      Should I be creating my own out of text component of some sort?


      4. Button


      I use buttons with state skins in these renderers and now think it might have been much better to use the SkinnableContainer?


      Any help would be greatly appreciated


      Many Thanks


      Tyrone (MonkeyMagiic)

        • 1. Re: Optimizing Gumbo Itemrenderers
          Flex harUI Adobe Employee

          1.  BitmapImage doesn't load external content.  If you know what your images

          are going to look like and they are small then embedding them will help.

          Regardless, make sure the resolution of the images matches the actual

          display size.


          2.  RichText is "heavy", but there is no lighterweight alternative to doing

          right-to-left text.


          3 & 4.  I would be surprised to find that button and linkbutton are the

          issue unless their skins are very heavy.

          1 person found this helpful
          • 2. Re: Optimizing Gumbo Itemrenderers
            monkeymagiic Level 1

            Good day,


            Thanks for the response.


            1. BitmapImage - My images are dynamic/remote though I would assume I could build a static loader/cache system to handle the loading of images which I would assume bring the size down? eg:


                 var image:BitmapImage =new BitmapImage( );

                      image.source = imageLoaderManager.getCachedImage( url );


            This would help Significantly as I am building a music app and hence the images for albums would all be the same and could cache based on this?



            2. RichText - So it is established RichText is far too heavy too be used in an ItemRenderer though is the only component for Right-Left Text, so what are other options for simple Left-Right text, what are all my Label/Text options?



            On another note I have been reading into using the Vector API which should make large savings on CPU processing?


            As always would enjoy knowing more





            • 3. Re: Optimizing Gumbo Itemrenderers
              FTQuest Level 3

              As it was already pointed out, BitmapImages can NOT by dynamically loaded.

              Here is the note from the langref:

              Note: Flex also includes the BitmapImage class. This class is used for embedding images into skins and FXG components. It is not a general-purpose image-loading class. For example, you cannot load images with the BitmapImage class at run-time.



              • 4. Re: Optimizing Gumbo Itemrenderers
                monkeymagiic Level 1

                Thanks FTQuest


                Though I did understand this completely, the theory was to use the BitmapImage class and use an external Static Class with a URLoader which would handle all the loading resulting in the Itemrenderer being less heavy.


                In essence being used as a BulkLoader to handle all image loading.