Bug 40523 - Creating controls at runtime is much slower than with native Xamarin.Android project
Summary: Creating controls at runtime is much slower than with native Xamarin.Android ...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.1.0
Hardware: PC Mac OS
: Highest normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-04-19 15:00 UTC by John Miller [MSFT]
Modified: 2017-06-23 15:10 UTC (History)
11 users (show)

Tags: android, ac, performance
Is this bug a regression?: ---
Last known good build:


Attachments
Sample Project (249.93 KB, application/zip)
2016-04-19 15:00 UTC, John Miller [MSFT]
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 for Bug 40523 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description John Miller [MSFT] 2016-04-19 15:00:36 UTC
Created attachment 15769 [details]
Sample Project

**Overview:**

   Attached is a sample project that creates controls at runtime. It's much slower in Forms. Looking for an explanation of why, and if this is within acceptable parameters of performance for Forms. 

**Steps to Reproduce:**

   1. Run the attached Forms Android project on an Android device.
   2. Press the button.

   Do the same for the "native" project. 

**Actual Results:**

   An alert will appear to show elapsed ms. 

**Expected Results:**

   Performance times should be similar between the Native and Forms projects. 

**Build Date & Platform:**

   XF 2.1

**Additional Information:**

   On my nexus 5, the Forms project takes about ~1 second. The native project takes about 100-200ms.
Comment 1 aed 2016-07-02 23:26:13 UTC
I would really like to see the Xamarin team comment on XF Android performance. 

I've also filed several bugs about XF on Android being much slower than iOS and much slower than native, but so far all of them have been left in the "NEW" state or resolved as invalid.

My iPhone 4S from 2011 runs XF 3 times faster than my Nexus 5.
Comment 2 Olivier Ansquer 2016-07-04 08:13:04 UTC
It's really annoying to have no return on these performances that are clearly not satisfactory.
Comment 3 Emanuele Sabetta 2016-09-06 10:41:04 UTC
Something should be done for XF performances on Android. They seems to become worse as the app grows, until it become unusable (7-10 second between refreshes, while it's almost instantaneous on iOS). The XF Android code clearly does not scale.
Comment 4 Rui Marinho 2016-10-04 11:46:29 UTC
*** Bug 44058 has been marked as a duplicate of this bug. ***
Comment 5 Cody Beyer (MSFT) 2017-06-19 21:42:49 UTC
*** Bug 44058 has been marked as a duplicate of this bug. ***