Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll performance is low on iPad 4 #23

Open
VladimirCores opened this issue May 6, 2014 · 2 comments
Open

Scroll performance is low on iPad 4 #23

VladimirCores opened this issue May 6, 2014 · 2 comments

Comments

@VladimirCores
Copy link

I got a screen with a lot of LevelItemRenderer on it, with the same number of components in it (as a LevelsTemplate from examples) and when i scroll them performance drop down very significant to about 15 fps or even lower. How can i improve that?

@rzarich
Copy link
Collaborator

rzarich commented May 7, 2014

  1. How many item renderers do you have?
  2. How many draw calls are during scrolling?
  3. What elements are in the item renderer?

@VladimirCores
Copy link
Author

Here is a screenshot from desktop
http://oi61.tinypic.com/2vl2o1s.jpg

    public function LevelItemRenderer(itemSize:Number)
    {
        super();

        touchableWhereTransparent = true;

        var textures:MenuTextures = new MenuTextures();

        _background = new Image(textures.levelBackground);
        _button = new Button(textures.levelBackground);

        addElement(_background, $width(itemSize).rcpx, $height(itemSize).rcpx);
        addElement(_button, $width(itemSize).rcpx, $height(itemSize).rcpx);

        var sx:Number = _button.scaleX;
        var sy:Number = _button.scaleY;

        // Level lock
        _levelLock = new Image(textures.levelLock);
        _levelLock.scaleX = sx;
        _levelLock.scaleY = sy;
        addElement(_levelLock, $vCenter(0).rcpx, $hCenter(0));

        flatten();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants