Bug 26107 - Adding Content With Lots Of Grids Dynamically Exponentially Slow
Summary: Adding Content With Lots Of Grids Dynamically Exponentially Slow
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-16 10:38 UTC by Robert Stubbs
Modified: 2015-01-27 13:18 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Replicated Sample Project (6.16 MB, application/x-zip-compressed)
2015-01-16 10:40 UTC, Robert Stubbs
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Robert Stubbs 2015-01-16 10:38:30 UTC
Hi Guys,

Recently updated our App to 1.3.1, got it to build but seem to be having major delay issues in adding content with lots of grids dynamically.

Our app is fairly complicated so i created a new project (ran it on android) and replicated the issue (see attached)

basically our main contentpage loads fine, no issues, but adding contentviews to a grid seem to get insanely slow.

control_test is the main page slowcontenttest is a content view.

clicking the next button just does a Children.Add(new slowcontenttest)

now sit back and wait for literally 60 seconds while it tries to show the new content. ( about 30 on an ipad air )

removing grid "content 2" from the slowcontenttest xaml seems to reduce the time on android to about 14 seconds and removing "content 1" seems to reduce it further so the assumption is there is a problem with nested grids.

while it was not the fastest before on Xamarin.Forms 1.2.3, it was only about a second delay, this has only come to light in the recent update of 1.3.1

we were days away from completing our project, figured we would do an update to comply with the new 64bit IOS store requests

I have attached App5.zip which was created with the 1.3.1 Xamarin.Forms I wanted to do a comparison project but there seems to be no way to add earlier versions of Xamarin.Forms without fully downgrading.

Is there any workaround (obviously without removing grids as our app is pretty much done...)? Is this a known issue with plans for it to be fixed?

kind regards Robert
Comment 1 Robert Stubbs 2015-01-16 10:40:47 UTC
Created attachment 9381 [details]
Replicated Sample Project
Comment 2 Akhilesh kumar 2015-01-20 10:44:43 UTC
I have tried to reproduce this issue and able to reproduce the reported behavior at my end.

Steps to Reproduce:
1. Open the attached sample.
2. Run the application on the device 

Observation:

1.Click on next button, it will take 60 second to load the new content.
2. Now Remove the Outer grid i.e _content2 from the slowcontenttest xaml you will find that application take 14 sec to launch new content after clicking on Next Button.

Device Log: https://gist.github.com/AkhileshKumar01/fccbd247a5eb359a53e7

Build Info:

=== Xamarin Studio ===

Version 5.7.1 (build 14)
Installation UUID: 9964a087-9af9-4da0-aa20-07ca4b85f306
Runtime:
	Microsoft .NET 4.0.30319.18408
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 5.0.0 (Enterprise Edition)
Android SDK: D:\android-sdk
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 507010014
Git revision: a4dd61ad7f8b3695be4b17bcb5c3ae6b81438cf7
Build date: 2015-01-19 15:21:14-05
Xamarin addins: 081208fe3bbf40e24a562867c6c7fba20a9b94b6

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 3 Jason Smith [MSFT] 2015-01-27 05:13:35 UTC
So we are going to try to see what we can do about this, but if this is really your layout have have *got* to figure out how to flatten it out. Every layer of depth adds a lot to this...
Comment 4 Jason Smith [MSFT] 2015-01-27 05:31:15 UTC
We have a good fix in the works, will update bug when the fix is merged into master
Comment 5 Robert Stubbs 2015-01-27 05:38:06 UTC
taa, looking forward to it :)
Comment 6 Jason Smith [MSFT] 2015-01-27 13:18:06 UTC
Resolved in 1.3.3-pre1