You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2013/12/18 18:10:34 UTC

Scroller update performance

I have a screen with a number of TileGroups positioned vetically. Each
TileGroup has a number of controls too. Yes, this screen is very busy. All
these Tilegroups are placed inside of Scroller in order to scroll the
screen. I am listening to updateComplete on the Scroller. I see that it
takes time before I get into the listener. What kind of recommendations
anyone has to improve scroller's performance?

Thanks

Re: Scroller update performance

Posted by Alex Harui <ah...@adobe.com>.
Use Scout or the profiler to see what is taking all of that time.

On 12/18/13 11:45 AM, "mark goldin" <ma...@gmail.com> wrote:

>Well, what I am experiencing is that it would take some time (seconds)
>until I even get into scrollerInstance_creationCompleteHandler.
>
>
>On Wed, Dec 18, 2013 at 1:42 PM, jude <fl...@gmail.com> wrote:
>
>> I was looking into this a few days ago. I was comparing the scrolling in
>> Flex container scrolling in a page in the browser. The browsers
>>scrolling
>> was much smoother and faster (for me - Firefox, Mac). I found an example
>> online to increase the page scroll size and it's an improvement but it's
>> not as smooth:
>>
>>     protected function
>> scrollerInstance_creationCompleteHandler(event:FlexEvent):void {
>>            scrollerInstance.addEventListener(MouseEvent.MOUSE_WHEEL,
>> scroller_mouseWheel, true);
>>     }
>>
>>     protected function scroller_mouseWheel(e:MouseEvent):void {
>>         e.preventDefault();
>>         e.stopImmediatePropagation();
>>         scrollerInstance.viewport.verticalScrollPosition  -= e.delta *
>>10;
>>     }
>>
>>
>> I realized the Scroller class already has smooth scrolling support as of
>> Flex 4.5 on mobile but it's disabled on the desktop. You can enable it
>>on
>> desktop by setting the interaction mode to touch but it has a few major
>> issues.
>>
>> € the Scroller UI is invisible until it's used and then it fades out
>>the UI
>> components (track and thumb buttons)
>> € it interferes with normal mouse interactions (adds dragging the
>>screen on
>> mouse down and mouse move like the hand cursor in Acrobat)
>> € it ignores common mouse interactions (mouse wheel scrolling).
>> € it reverses the scroll direction
>>
>> This might be something we can enable in the Scroller class through a
>> property such as "enableSmoothScrolling" but it would require some work
>>to
>> work on desktop.
>>
>>
>> On Wed, Dec 18, 2013 at 11:10 AM, mark goldin <ma...@gmail.com>
>> wrote:
>>
>> > I have a screen with a number of TileGroups positioned vetically. Each
>> > TileGroup has a number of controls too. Yes, this screen is very busy.
>> All
>> > these Tilegroups are placed inside of Scroller in order to scroll the
>> > screen. I am listening to updateComplete on the Scroller. I see that
>>it
>> > takes time before I get into the listener. What kind of
>>recommendations
>> > anyone has to improve scroller's performance?
>> >
>> > Thanks
>> >
>>


Re: Scroller update performance

Posted by mark goldin <ma...@gmail.com>.
Well, what I am experiencing is that it would take some time (seconds)
until I even get into scrollerInstance_creationCompleteHandler.


On Wed, Dec 18, 2013 at 1:42 PM, jude <fl...@gmail.com> wrote:

> I was looking into this a few days ago. I was comparing the scrolling in
> Flex container scrolling in a page in the browser. The browsers scrolling
> was much smoother and faster (for me - Firefox, Mac). I found an example
> online to increase the page scroll size and it's an improvement but it's
> not as smooth:
>
>     protected function
> scrollerInstance_creationCompleteHandler(event:FlexEvent):void {
>            scrollerInstance.addEventListener(MouseEvent.MOUSE_WHEEL,
> scroller_mouseWheel, true);
>     }
>
>     protected function scroller_mouseWheel(e:MouseEvent):void {
>         e.preventDefault();
>         e.stopImmediatePropagation();
>         scrollerInstance.viewport.verticalScrollPosition  -= e.delta * 10;
>     }
>
>
> I realized the Scroller class already has smooth scrolling support as of
> Flex 4.5 on mobile but it's disabled on the desktop. You can enable it on
> desktop by setting the interaction mode to touch but it has a few major
> issues.
>
> • the Scroller UI is invisible until it's used and then it fades out the UI
> components (track and thumb buttons)
> • it interferes with normal mouse interactions (adds dragging the screen on
> mouse down and mouse move like the hand cursor in Acrobat)
> • it ignores common mouse interactions (mouse wheel scrolling).
> • it reverses the scroll direction
>
> This might be something we can enable in the Scroller class through a
> property such as "enableSmoothScrolling" but it would require some work to
> work on desktop.
>
>
> On Wed, Dec 18, 2013 at 11:10 AM, mark goldin <ma...@gmail.com>
> wrote:
>
> > I have a screen with a number of TileGroups positioned vetically. Each
> > TileGroup has a number of controls too. Yes, this screen is very busy.
> All
> > these Tilegroups are placed inside of Scroller in order to scroll the
> > screen. I am listening to updateComplete on the Scroller. I see that it
> > takes time before I get into the listener. What kind of recommendations
> > anyone has to improve scroller's performance?
> >
> > Thanks
> >
>

Re: Scroller update performance

Posted by jude <fl...@gmail.com>.
I was looking into this a few days ago. I was comparing the scrolling in
Flex container scrolling in a page in the browser. The browsers scrolling
was much smoother and faster (for me - Firefox, Mac). I found an example
online to increase the page scroll size and it's an improvement but it's
not as smooth:

    protected function
scrollerInstance_creationCompleteHandler(event:FlexEvent):void {
           scrollerInstance.addEventListener(MouseEvent.MOUSE_WHEEL,
scroller_mouseWheel, true);
    }

    protected function scroller_mouseWheel(e:MouseEvent):void {
        e.preventDefault();
        e.stopImmediatePropagation();
        scrollerInstance.viewport.verticalScrollPosition  -= e.delta * 10;
    }


I realized the Scroller class already has smooth scrolling support as of
Flex 4.5 on mobile but it's disabled on the desktop. You can enable it on
desktop by setting the interaction mode to touch but it has a few major
issues.

• the Scroller UI is invisible until it's used and then it fades out the UI
components (track and thumb buttons)
• it interferes with normal mouse interactions (adds dragging the screen on
mouse down and mouse move like the hand cursor in Acrobat)
• it ignores common mouse interactions (mouse wheel scrolling).
• it reverses the scroll direction

This might be something we can enable in the Scroller class through a
property such as "enableSmoothScrolling" but it would require some work to
work on desktop.


On Wed, Dec 18, 2013 at 11:10 AM, mark goldin <ma...@gmail.com> wrote:

> I have a screen with a number of TileGroups positioned vetically. Each
> TileGroup has a number of controls too. Yes, this screen is very busy. All
> these Tilegroups are placed inside of Scroller in order to scroll the
> screen. I am listening to updateComplete on the Scroller. I see that it
> takes time before I get into the listener. What kind of recommendations
> anyone has to improve scroller's performance?
>
> Thanks
>