This repository has been archived by the owner on May 1, 2024. It is now read-only.
[iOS] UI Frozen When Adding Many Children To a Layout #3417
Labels
a/performance
e/8 🕗
8
help wanted
We welcome community contributions to any issue, but these might be a good place to start!
inactive
Issue is older than 6 months and needs to be retested
p/iOS 🍎
t/bug 🐛
up-for-grabs
We welcome community contributions to any issue, but these might be a good place to start!
Projects
Description
To best describe this issue the repro project has the main page split in two:
1. On the left I create a
StackView
to which I add 1000 simple labels, programatically, at the press of the "FORMS" button. While the content is rendered the UI is completely frozen for many seconds, depending on the number of children. The rendering time increases exponentially, 200 children will not take twice as long as 100 children, but much more, reaching 35 seconds for 1000 labels on an iPhone X Simulator (iOS 11.4)2. On the right, at the press of "NATIVE" button I add a
ContentView
for which I have created some crude renderers (iOS and Android), enough to be able to add the same 1000 labels to the view from the native projects. The difference is huge, as illustrated by the screenshot.EnsureChildrenOrder
,BringSubviewToFront
seem to be the bottleneck.I have found some good discussions on the Forums about this, but no solution/workaround was found:
Expected Behavior
The UI shouldn't be frozen for so long, on 200 elements the usability is already reduced. A
ListView
is not always feasible to use, I'm thinking about an usecase where I would want to display a Data Grid to the users, set in aScrollView
withOrientation
set toBoth
Basic Information
Reproduction Link
FreezeRepro.zip
The text was updated successfully, but these errors were encountered: