Bug 41974 - UWP application run too slow if Native Compiler enabled!
Summary: UWP application run too slow if Native Compiler enabled!
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.0
Hardware: PC Windows
: --- normal
Target Milestone: UWP
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-06-18 16:29 UTC by Mike
Modified: 2017-04-28 18:42 UTC (History)
2 users (show)

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


Attachments
Enable Native Compiler (41.88 KB, image/png)
2016-06-18 17:49 UTC, Mike
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 INVALID

Description Mike 2016-06-18 16:29:15 UTC
As you guys know Microsoft give us a new feature call :Native Compiler.  all for let the .Net run more faster.

In the default it enabled on Release mode, not Debug mode,  position:  Right click project---->Property----->Build---->after select target platform you will see it, it's a checkbox.

But after I use Xamarin, I realize if I open the Native Compiler, The application will slow by 300% - 500%.

Even sometime I do something like this:


// Start animation
AnimationLoading = true;

// Do something
Task.Run(()=>{

// Do some stuff.


// Stop animation in the end
Xamarin.Forms.Device.BeginInvokeOnMainThread(()=>{

AnimationLoading = false;

});

});


The Animation even stuck in here, all UI freeze. also all response will too slow....

I really hope you guys not let Native Compiler more worse, at least for UWP.
don't let it speed slow by 300-500%.  You guys should let the speed fast by 10000% because that's Native Compiler.

I think currently that really opposite with the name what we call.
Comment 1 Mike 2016-06-18 17:42:57 UTC
also the ListView load more slow, even some page has a ListView , the page will not load and freeze for a while before ListView load finish. I think that's about design, because in currently version Xamarin, Listview has animation , it looks people see that look like added 1 by 1, but just because that, as I mention before, Currently  Native Compiler will freeze that kind of page. all will freeze for a while. 

Of course, that's not only  Native Compiler problem, I already open another thread for Listview problems. https://bugzilla.xamarin.com/show_bug.cgi?id=41975

But the page and ListView Template not too complicate,
Comment 2 Mike 2016-06-18 17:49:22 UTC
Created attachment 16396 [details]
Enable Native Compiler
Comment 3 Mike 2016-06-19 19:09:10 UTC
After add [assembly: XamlCompilation(XamlCompilationOptions.Compile)] it's much more better.
Comment 4 Mike 2016-06-19 19:10:01 UTC
It's very helpfull if continue let it run more faster
Comment 5 Mike 2016-06-19 20:23:22 UTC
currently looks like after use XamlCompilation, it's like DEBUG,  but it will very better if the application run more faster because use Native Compiler.
Comment 6 Mike 2016-11-29 17:08:42 UTC
If you guys think that's normal just close it please. because I never test it without 
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
now.  also I already used to the low speed. All looks like there are some performance problem, I already create new ticket for thoese.
Comment 7 Paul DiPietro [MSFT] 2017-03-08 19:46:27 UTC
What is your experience like presently without using XamlC compilation? Has it gotten any better or has it stayed about the same? Are there certain scenarios where enabling it makes things worse (for example, using a ListView with a complex ViewCell)? We obviously don't want to discount any possible areas for improvement but having more information about what could cause it might be helpful.
Comment 8 Mike 2017-04-28 18:42:39 UTC
This could close now.
Add XAML compile will much more better: 
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]



Other UWP slow problems will discuss in here: https://bugzilla.xamarin.com/show_bug.cgi?id=46856
https://bugzilla.xamarin.com/show_bug.cgi?id=48682
https://bugzilla.xamarin.com/show_bug.cgi?id=41975