Bug 24508 - Slow navigation with transparent images on Samsung Galaxy S3 and S4
Summary: Slow navigation with transparent images on Samsung Galaxy S3 and S4
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-11-13 18:05 UTC by Dominic N [MSFT]
Modified: 2016-11-18 03:46 UTC (History)
7 users (show)

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

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 Dominic N [MSFT] 2014-11-13 18:05:16 UTC
## Overview

There is a report of an issue with Xamarin.Forms in Android only (it works as expected in iOS according to the customer) when using transparent images in navigation. The use of grids with transparent images results in page navigation becoming extremely slow and dropping frames. It eventually crashes with an out of memory exception on specific devices only.

The customer also attempted giving opacity values to the grid instead of using images with no change in results.

I will attach the customer's sample application that can be used to demonstrate this issue along with the application output and logcat logs that resulted when I ran the app on an S3.

## Steps to reproduce

1. Open the attached project.
2. Deploy to a non Galaxy phone.
3. Click the login button and note how the transition functions.
4. Press the Android back button.
5. Repeat 3 and 4 a few times.
6. Deploy to a Galaxy S3 (confirmed) or S4 (not confirmed) device.
7. Click the login button and note the transition.
8. Press the Android back button.
9. Repeat 7 and 8 a few times.

## Actual results

Application does not transition from screens smoothly and eventually crashes on a Samsung Galaxy S3. Prashant has tested on XAP's Nexus 7 Image and I have tested on a Galaxy S5 and an old Motorola RAZR i XT890 without issue. We have not been able to test on a Galaxy S4.

## Expected results

Application should run without issue.

## Version Information

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: ee07b9c8-41e3-496f-a1ab-e8a3ed3db20f
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: (Business Edition)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 80e9ff7
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Android ===

Version: 4.18.1 (Business Edition)
Android SDK: /Users/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.9.4
Darwin MacBook-Pro.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Rajneesh Kumar 2014-11-14 01:45:10 UTC
I have checked this issue and here are my observations:(I have followed the steps provided in bug description)

Nexus 4: I am able to deploy the application, and app does transition from screens smoothly and able to see transparent images in navigation.
Build O/P:https://gist.github.com/Rajneesh360Logica/12b3d53f314688728eee
App O/P:https://gist.github.com/Rajneesh360Logica/7186f4ebc3068025f640

Galaxy S4: I am able to deploy the application, and app does not transition from screens smoothly, even not able to see transparent images in navigation(Background).
Build O/P:https://gist.github.com/Rajneesh360Logica/2ddf7408f7ee8316c6a1
App O/P: https://gist.github.com/Rajneesh360Logica/8154af6326668b2ed349

Galaxy S3: I observed that application goes crash on deploying.
Build O/P:https://gist.github.com/Rajneesh360Logica/a19b7c39e7ec70872c6a
Device Log: https://gist.github.com/Rajneesh360Logica/f111875ba45778ac9ca1
App O/P: Nothing

Screencast: http://www.screencast.com/t/m8aOJDW99OY

Ide Logs:https://gist.github.com/Rajneesh360Logica/872a8f2e3f495dab093e

Please let me know if I can provide more useful information from my side.
Comment 3 Jason Smith [MSFT] 2014-12-02 16:36:12 UTC
This issue is triggered by the large size of the background image and not the transparency (though that does play into some extra GPU overhead). This is causing some thrashing in the device. Downsampling of the image is required (and is being worked on in forms).

Simply loading a smaller background.png image fixes the issue on my SIII.
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2014-12-05 14:07:15 UTC
In case it's helpful for any users hitting this issue, I believe bug 19745, comment 11 provides some relevant further discussion comparing the performance of large background images in both Xamarin and Java Android apps. In short, large background images cause problems for Java Android apps too.