Bug 37976 - Forms.Android performance drop by 35% due to the toolbar
Summary: Forms.Android performance drop by 35% due to the toolbar
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-01-25 06:02 UTC by Kirill
Modified: 2017-06-19 21:12 UTC (History)
13 users (show)

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


Attachments
Xamarin Profiler (144.78 KB, image/png)
2016-01-25 06:02 UTC, Kirill
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 NORESPONSE

Description Kirill 2016-01-25 06:02:45 UTC
Created attachment 14707 [details]
Xamarin Profiler

Starting Xamarin.Forms Android, it has become 35% more slowly because of frequent UpdateToolbar

The error only appears when you create a NavigationPage.

Xamarin Profiler File: https://www.dropbox.com/s/0s778f6ytir5vk6/toolbar.mlpd?dl=0
Comment 2 Rogier van der Hee 2016-08-24 09:31:15 UTC
What did you do exactly when running the profiler? It shows in instance count of 2500 times.

UpdateToolbar is now called upon (AFAICT):

1. Init (AttachedToWindow)
2. Reset (onlayout - change of bar size, rotate)
3. Property change (bar background color, bar text color, title, has nav button)
4. Page stack change (insert page before, remove page)
5. Switch content (OnPush/ OnPop..)

With these events in mind, I wonder how it can be pushed to 2500 counts..

Optimizations I see is that for every property change ALL the properties are updated (back/foreground colors, drawer, title etc) of the toolbar. This could be made more granular and/or with a check whether the value has actually changed before doing a change.
Comment 3 E.Z. Hart [MSFT] 2016-12-21 23:01:49 UTC
Could you provide a sample application reproducing this behavior?
Comment 4 Chris King 2017-06-19 17:21:01 UTC
Assigned to you as you were last to request additional info.
Comment 5 Samantha Houts [MSFT] 2017-06-19 21:12:58 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!