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

[Bug] [UWP] [Performance] Editor with autosize property is very slow #13097

Open
BurkusCat opened this issue Dec 10, 2020 · 1 comment
Open
Labels
a/editor e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! p/UWP t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects

Comments

@BurkusCat
Copy link
Contributor

BurkusCat commented Dec 10, 2020

Description

Performance when using the Editor control on UWP with the autosize property set is incredibly slow. Typing individual letters or pasting text becomes noticeably unperformant.

Steps to Reproduce

  1. Create an editor and set autosize on it
  2. Fill the editor with lots of text
  3. Try typing or pasting content in it. In my opinion, it becomes unusable with a small amount of text.

Expected Behavior

Editor performs well for a larger amount of text. I don't think anyone expects an infinite amount of text, but the editor currently gets very bad very quickly.

Actual Behavior

Entering text into an editor slows down dramatically the more text that is entered. I've also experienced general issues with the autosizing where it can interfere with other layouts on the page and cause them to display wrong (I feel like the more complex your layout, the worse the performance can be). A simple layout with a text editor has performance issues too.

Basic Information

  • Version with issue: 4.8.0.1687
  • Last known good version: N/A
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP: 19041
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices: i5-4690k

Screenshots

I have created a video to demo the issue. The first editor uses auto size. The second editor uses a fixed height and no auto size. Both editors start with 5 paragraphs of lorem ipsum. The test I do is hold down a key on my keyboard for a few seconds and then I hold down Ctrl + V to repeatedly paste a line of text. An editor without auto size can hold magnitudes more text and remain responsive. The autosize editor feels like it loses performance exponentially as more text is added.
https://www.youtube.com/watch?v=K7aaRRLb7FU

Reproduction Link

<Editor AutoSize="TextChanges" />

AutosizeEditor.zip

Workaround

Unfortunately, using a fixed height editor is the only solution I've found. This solution isn't great as it means wasted space or the text will overflow beyond the editor with no indication that there is more text to see.

@BurkusCat BurkusCat added s/unverified New report that has yet to be verified t/bug 🐛 labels Dec 10, 2020
@samhouts samhouts added this to New in Triage Dec 10, 2020
@PureWeen PureWeen moved this from New to Ready For Work in Triage Dec 11, 2020
@PureWeen PureWeen added help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! and removed s/unverified New report that has yet to be verified labels Dec 11, 2020
@BrayanKhosravian
Copy link
Contributor

BrayanKhosravian commented Nov 28, 2021

Made a quick analysis.
I verified this and it seems like this happens only when around 4200 chars are exceeded.
Also created a blank upw project and entered the text causing the issue to a textbox.
I didn't implement a line break behavior in that uwp project and the performance was not bad at all.
I assume that the issue happens when applying the linebreaks in xf or during the measure and layout cycle.

To fix this, someone should identify the bottleneck and improve or fix it afterwards.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/editor e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! p/UWP t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
Triage
  
Ready For Work
Development

No branches or pull requests

3 participants