Bug 34684 - BoxView makes UI extremely slower
Summary: BoxView makes UI extremely slower
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-10-08 10:49 UTC by pedro.neves
Modified: 2016-04-13 18:30 UTC (History)
2 users (show)

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

The layout (5.90 KB, application/xaml+xml)
2015-10-08 10:49 UTC, pedro.neves

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:

Description pedro.neves 2015-10-08 10:49:50 UTC
Created attachment 13243 [details]
The layout

Using BoxView elements makes the UI much slower, only on Android (barely usable in the given example). Quantity matters, more BoxViews, slower UI.
Comment 1 Paul DiPietro [MSFT] 2015-10-08 13:17:37 UTC
Hi, could you possibly clarify exactly what aspect of the UI becomes slower as a result of this? Based on that XAML you provided I am not seeing anything glaring between iOS and Android versions. Providing a runnable project is always appreciated, as well. Additional info will help the Forms team to investigate this issue.
Comment 2 pedro.neves 2015-10-09 03:50:48 UTC
Scrolling becomes really slow (it is all inside a scrollview), in that specific case. But in the rest of the project i did notice that everything is slower, loading the page, clicking the buttons, typing to entries, everything. I can't provide the project, i'm not allowed to do it, sorry.

But this happens in PCL projects (at least that is what i use, might happen in shared projects), the more BoxViews i add, the (considerably) slower it gets. The XAML i provided you is not usable at all.

Btw, Android packages:
  <package id="Xamarin.Android.Support.v4" version="" targetFramework="MonoAndroid51" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="" targetFramework="MonoAndroid51" />
  <package id="Xamarin.Android.Support.v7.MediaRouter" version="" targetFramework="MonoAndroid51" />
  <package id="Xamarin.Forms" version="" targetFramework="MonoAndroid23" />
  <package id="Xamarin.Forms" version="" targetFramework="MonoAndroid51" />
  <package id="Xamarin.Forms.Maps" version="" targetFramework="MonoAndroid51" />
  <package id="Xamarin.GooglePlayServices" version="" targetFramework="MonoAndroid51" />

PCL packages:
  <package id="ExifLib.PCL" version="1.0.1" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="PCLCrypto" version="" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="Validation" version="" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="Xam.Plugin.Geolocator" version="1.0.4" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="Xamarin.Forms" version="" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="Xamarin.Forms.Maps" version="" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="XLabs.Core" version="2.0.5679" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="XLabs.Forms" version="2.0.5679" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="XLabs.IoC" version="2.0.5679" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="XLabs.Platform" version="2.0.5679" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
  <package id="XLabs.Serialization" version="2.0.5679" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />

VS info:

Microsoft Visual Studio Community 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.5.51650

Installed Version: Professional

Team Explorer for Visual Studio 2013   06177-004-0444002-02356
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0444002-02356
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0444002-02356
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0444002-02356
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0444002-02356
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02356
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0444002-02356
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.5.60612.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Web Apps
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30612.0
For additional information, visit http://www.asp.net/

Code alignment   12
Code alignment helps you present your code beautifully, enhancing clarity and readability.

Common Azure Tools   1.4
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.60610.756
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SAPReferenceManager   1.0
Manages References to Shared Projects

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Xamarin   3.11.1450.0 (75e86d0)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (58099c5358da3488b0e7fb0bb4af47aca7cc61d6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS (73db6324ad6864caae30bf4010c185598d262e69)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 3 pedro.neves 2015-10-09 03:51:41 UTC
I mean everything is slower in every page that uses BoxView. Which was pretty much all of them in my case.
Comment 4 Jason Smith [MSFT] 2016-04-13 18:30:21 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team