Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Tizen] Added Fast Layout Opt-in #13221

Merged
merged 1 commit into from
Dec 27, 2020
Merged

Conversation

rookiejava
Copy link
Collaborator

Description of Change

This PR is for improving layouting (especially on scrolling) performance. Previously, we were using ElmSharp.Box internally for layouting. In normal case this works fine, but we found an issue where scrolling performance degrades as more controls are included in the ScrollView and the layout hierarchy gets more complex. For target devices with severe resource constraints, scrolling performance decreases more noticeably.

To solve this problem, this PR implements and uses EvasBox (from evas) instead of Box (from elementary) to optimize unnecessary coordinate calculation during layout. As a result, it was confirmed that the scroll performance was improved by about 1 to 2 times compared to the previous one.

You can use FastLayoutRenderer through opt-in as shown below. (The default is false.)

var option = new InitializationOptions(app)
{ 
   //....
    UseFastLayout = true
};

Forms.Init(option);

Limitations

  • When using EvasBox, there may be functional restrictions such as focus movement and accessibility through key events. (It is not recommended when the focus is moved by key input on the remote control rather than by touch, such as on a TV device.)

Issues Resolved

None

API Changes

namespace Xamarin.Forms
Added:

  • InitilizationOptions.UseFastLayout {get; set;}
  • Forms.UseFastLayout {get; set;}

namespace Xamarin.Forms.Platform.Tizen
Added:

  • class FastLayoutRenderer

namespace Xamarin.Forms.Platform.Tizen.Native
Added:

  • class EvasBox
  • class EvasFormsCanvas

Platforms Affected

  • Tizen

Behavioral/Visual Changes

None

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho rmarinho merged commit 6ea5fa9 into xamarin:5.0.0 Dec 27, 2020
@samhouts samhouts added this to the 5.0.0 milestone Jan 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants