Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:16:59+00:00 2026-06-08T23:16:59+00:00

Imagine a tablet app that displays two content areas side by side. They completely

  • 0

Imagine a tablet app that displays two content areas side by side. They completely fill the display, so are 100% in height and 50% in width.
Lets assume we add a list to one container. Naturally this list will consume half the space of the whole display.

Now to my problem, is it possible that high framerate scrolling is kind of impossible with lists of this size? I’ve got the most basic AS3 ItemRenderer and still can’t get anything higher than 30fps during scrolling. Now the odd part, if I add stuff the other container, lets say another list or other components, the list scrolling performance drops to the low 20s.
So nowhere near the 40+ fps you see Adobe advertising in their MAX shows.

I’m testing on a iPad2 and 3 and even with static values, scrolling isn’t really good. Now if I enable streaming values so that the ItemRenderer’s set data method is called, the framerate drops another 2 to 3 frames.

My (almost) complete renderer looks like this, but even if I strip it to just display a single textfield, disable the stuff going on in the set data and also set only the size of the single textfield in the layoutContents, performance is as described, about 30 if the list is displayed alone, low 20s if other stuff is displayed as well.

    //FCStyleableTextField is just a StyleableTextField with an additional ID

    private var _textFields:Vector.<FCStyleableTextField>;
    private var _oldValues:Dictionary;
    private var _sym:Symbol;

    public function GridRenderer() {
        super();
        _textFields = new Vector.<FCStyleableTextField>();
        _oldValues = new Dictionary();
    }

    override protected function createChildren():void {

        var _symLabel:FCStyleableTextField = new FCStyleableTextField();
        _symLabel.editable = false;
        _symLabel.selectable = false;
        _symLabel.multiline = false;
        _symLabel.id="sym";
        _symLabel.setStyle("fontSize", fontSize);
        _symLabel.textColor = 0xc0c0c0;
        _textFields.push(_symLabel);
        addChild(_symLabel);

        var fidLen:int = fids.length;
        for (var i:int = 0; i<fidLen; i++) {
            var _fid_lbl:FCStyleableTextField = new FCStyleableTextField();
            _fid_lbl.selectable = false;
            _fid_lbl.editable = false;
            _fid_lbl.multiline = false;
            _fid_lbl.id = String(fids[i]);
            _fid_lbl.textColor = 0xc0c0c0;
            _fid_lbl.setStyle("textAlign", "right");
            _fid_lbl.setStyle("fontSize", fontSize);
            _fid_lbl.text = " ";
            _textFields.push(_fid_lbl);
            addChild(_fid_lbl);

            if(i>visibleColumns) {
                _fid_lbl.includeInLayout = false;
                _fid_lbl.visible = false;
            }
        }
    }


    override public function set data(value:Object):void {
        if(!value) return;

        if(data) {
            // check if the value's symbolName is different than the current
            // data's symbolName, if so, the itemRenderer has been 
            // recycled, thus we need to reset the old fid values
            if((value as Symbol).symbolName != (data as Symbol).symbolName)
                _oldValues = new Dictionary();
        }

        super.data = value;

        _sym = data as Symbol;

        try {
            var textLen:int = _textFields.length;
            for (var i:int = 0; i<textLen;i++) {
                var lbl:FCStyleableTextField = _textFields[i];
                if(lbl.id == "sym") {
                    lbl.text = _sym.symbolName;
                    lbl.truncateToFit();
                } else {
                    if(lbl.id == _sym.fidList.fidMap[lbl.id].fidId && lbl.text != _sym.fidList.fidMap[lbl.id].fieldValue) {
                        var time:int = new Date().time;
                        var timerName:String = _sym.symbolName+","+lbl.id+","+grid;
                        globalTimer.addTimer(timerName, time, "reset", lbl, null, null);

                        var _oldVal:* = _oldValues[lbl.id];
                        var _newVal:* = _sym.fidList.fidMap[lbl.id].fieldValue;

                        // basic color formatting
                        if(Number(_newVal) > Number(_oldVal))
                            lbl.textColor = 0x40c040;
                        else if(Number(_newVal) < Number(_oldVal))
                            lbl.textColor = 0xf05050;

                        // add + to change and changePercent fids if value is positive
                        if(lbl.id == "56") {
                            if(_newVal >0)
                                lbl.text = "+" + _newVal;
                            else
                                lbl.text = String(_newVal);
                        } else if(lbl.id == "11") {
                            if(_newVal >0)
                                lbl.text = "+" + _newVal;
                            else 
                                lbl.text = String(_newVal);
                        } else 
                            lbl.text = String(_newVal);

                        if(!_sym.fidList.fidMap[lbl.id].fieldValue)
                            lbl.text =" ";

                        _oldValues[lbl.id] = _newVal;
                    } 
                }

                lbl.truncateToFit();
            }       
        } catch (e:Error) { /* nothing to do here -> try/catch required due to async symbolassembly */ }
    } 

    override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void {
        var viewWidth:Number  = unscaledWidth  - paddingLeft - paddingRight;
        var viewHeight:Number = unscaledHeight - paddingTop  - paddingBottom;
        var _previousLabel:FCStyleableTextField;
        var textLen:int = _textFields.length;

        for(var i:int =0; i<textLen;i++) {
            var lbl:FCStyleableTextField = _textFields[i];
            graphics.beginFill(0x808080, .3);
            lbl.height = viewHeight;
            lbl.y = paddingTop;

            if(lbl.id=="sym") {
                lbl.width = 95;
            } else if (lbl.id == "35000") {
                lbl.width = 24;
            } else { 
                lbl.width = optimalColWidth;
            }

            _previousLabel ? lbl.x = (_previousLabel.x + _previousLabel.width): lbl.x = paddingLeft;
            graphics.drawRect(lbl.x+lbl.width, 1, 1, unscaledHeight-1);

            lbl.commitStyles();
            _previousLabel = lbl;
            graphics.endFill();
        }
    }

Still, I’m pretty sure that it is not the item renderer that causes the slowdown, cause as I said, it costs 2, maybe 3 frames compared to a renderer that displays just a single textfield.
I rather think that Flex somehow can’t handle the amount of vectors being displayed at once, is something like that possible? And is there any way to boost performance?
I already disabled live streaming values as soon as the user scrolls the list, so that flex basically just has to scroll bitmaps (since LabelItemRenderer automatically enables cacheasbitmap), but that gained maybe 4 frames.
What are your guys tricks to make scrolling a little smoother?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:17:03+00:00Added an answer on June 8, 2026 at 11:17 pm

    Figured out that using setElementSize() and setElementPosition() instead of using width/height and x/y makes quite a difference. Gained 3fps in initial scrolling performance and 8fps once every item has been rendered.
    So I’m pretty close to 30fps now, still not close to what you can do with a native app, but I figure that’s as good as it gets with Flex and such a massive renderer.

    Also disabled live updates so that the renderer doesn’t need to be cached as a bitmap again when updates come in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine you're writing a web app that will have 1 million users (they all
Imagine a table that has two fields, a smalltimedate and an int and about
Imagine we have two tables in the database, user (FK id_role) and role (PK
Imagine a database that tracks payments between customers. Say I've got a Customer table:
Imagine a table that looks like this: CREATE TABLE [dbo].[test]( [id] [uniqueidentifier] NULL, [name]
I am making an app that is readily available and MOSTLY used on phones,
I have a web application that is being used by browsers on desktop, tablet
Imagine two tables (A and B): A B 1 2 2 3 6 5
imagine a table that looks like this CUST FLAG1 FLAG2 --------------------- 1234 1 0
I have a client that want to have us develop an app that will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.