Let's talk performance

1234568»

Posts

  • batmacibatmaci DEMember ✭✭✭✭✭
    @NamyslawSzymaniuk did you check the installed size of your app using AOT? my app is 17 mb without AOT but when I use AOT+LLVM my app increases to 26 mb which acceptable but the difference comes once app installed on the device. my app installs 30mb on device while using AOT+LLVM it is above 100 mb. Do you people see this not a problem? of course many user wont recognize this until they get storage problem or if they use apps like link2SD to analyze apps. Beside that my app start up time is awesome. see my firebase report. I reach 2 secs on some devices. this is not an hello world app :D
    I need to reduce memory usage but it seems hard when using many images in listviews and caching them into memory
  • batmacibatmaci DEMember ✭✭✭✭✭

    It is written here https://xamarinhelp.com/improving-xamarin-forms-startup-performance/
    AOT is working only fr 5.1 and 7 versions but android 6 doesnt support, is it true?

  • batmacibatmaci DEMember ✭✭✭✭✭

    I created a detailed my results and question on SO here.

  • NamyslawSzymaniukNamyslawSzymaniuk USMember ✭✭✭✭

    @batmaci said:
    @NamyslawSzymaniuk did you check the installed size of your app using AOT? my app is 17 mb without AOT but when I use AOT+LLVM my app increases to 26 mb which acceptable but the difference comes once app installed on the device. my app installs 30mb on device while using AOT+LLVM it is above 100 mb. Do you people see this not a problem? of course many user wont recognize this until they get storage problem or if they use apps like link2SD to analyze apps. Beside that my app start up time is awesome. see my firebase report. I reach 2 secs on some devices. this is not an hello world app :D
    I need to reduce memory usage but it seems hard when using many images in listviews and caching them into memory

    Exact the same case. APK with AOT is big, but after installing, storage of app on device is enormous :neutral: . That's one of the disadvantage.

    Good summary on SO :+1:

  • alexuddalexudd SEMember ✭✭

    Hello everybody! I experience HUGE problems on UWP using simple animations such as TranslateTo etc. As @RinoJohnsen describes, everything runs smoothly on iOS and Android but is close to slideshows on UWP. Please help if you know anything regarding this. Thanks!

  • CharlesRoddieCharlesRoddie USMember ✭✭

    @RinoJohnsen said:
    I would like to raise the question on UWP animations. My current project have had the focus on performance. We really want to hit that 60 fps for our users since we believe this is a must have for our app. We have been able to hit that goal with iOS and Android with careful selection and optimization on our views and navigations. The one thing we haven't been able to solve is the choppy animations on UWP.

    Simple things like a view on a AbsoluteLayout where we want to animate it out of the layout with view.TranslateTo(0, -layout.X, 500, ...); This works excellent on Android and iOS, but a horrible animations for UWP. By horrible; I mean really choppy and by that, not hitting our goal.

    1: Is there any way for us to make this better on our end?

    2: Is this something that would be easy for you to fix?

    Possibly related to https://github.com/xamarin/Xamarin.Forms/issues/1623

  • RinoJohnsenRinoJohnsen USMember

    @CharlesRoddie Now that is a good find! It can possibly be related since the issue has not been resolved. Making a UWP app and doing some animations is buttery smooth, but mostly the same thing on Xamarin-UWP is choppy.

  • CharlesRoddieCharlesRoddie USMember ✭✭

    @RinoJohnsen I gathered some more information in the GitHub issue. If you have anything to contribute can you add it in that thread?

  • RinoJohnsenRinoJohnsen USMember
    edited January 2018

    @CharlesRoddie I don't have anything relevant to add to your findings. On the other hand, could we by any way (Roslyn, Cecil) add your hack to see if it gets better? I would be happy to help you out with that.

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    @ZenDroid said:
    CSS In Xamarin.Forms. Xamarin.Forms 2.6 now supports CSS styling. Why do we need it? Let's fix the old mistakes. Android app with Xamarin form - first load 5 seconds(minium). Let's make a good product and not a marketing advertisement.

    In my tests with the SmartHotel360 app I got 1.6s cold start on a first generation Pixel running 8.0.

    • XAMLC enabled
    • AOT enabled

    It has a fair amount of NuGet packages, custom fonts, and styling in the App.xaml.

    Another strategy as already cited in this thread is to use Native Forms to go bare Android and embed Xamarin.Forms pages as needed, or delay launching the Xamarin.Forms part until after the app is loaded.

    Let's make a good product and not a marketing advertisement.

    Agree!

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited January 2018

    @PhilipGruebele said:
    CSS In Xamarin.Forms. Xamarin.Forms 2.6 now supports CSS styling. Why do we need it? Let's fix the old mistakes. Android app with Xamarin form - first load 5 seconds(minium). Let's make a good product and not a marketing advertisement.

    MANY of use sounded that same rallying cry when it was just a proposal in the (now dead) Evolution forum. How about making Xamarin XAML on par with WPF XAML for example? Still no ViewBox. Still no MergeDictionary in XAML. Can't bind a target that could be null even with a converter. And countless other things.

    However... Those cries fell on deaf ears apparently since CSS was pushed to 2.6. I guess they want to have even more paths of complaints. As long as web developers can think they can use Xamarin with no training (like there isn't enough of that already) the "adoption numbers" can skyrocket. The number of users doesn't mean anything. The number of successful and happy and productive users on the other hand; that should be important.

  • batmacibatmaci DEMember ✭✭✭✭✭
    @DavidOrtinau aot size is a bit problem and i digged into this. I had this question on SO, can you take look please? is it A Bug? https://stackoverflow.com/q/47916358/492482
  • ZenDroidZenDroid USMember ✭✭✭

    My opinion about the future Xamarin Forms. You can make an excellent product for developers C#(with xaml). Or you can fight for the attention of web developers. But this is the way to lose. The product will receive new bugs and many competitors(React Native, Cordova and other ....). We must do what we are strong - C#(xaml).
    It's my opinion.

  • ZenDroidZenDroid USMember ✭✭✭
    edited January 2018

    @DavidOrtinau I tested SmartHotel360 app on my devices(phone and tablet). I have result - first load 5 seconds :(. I have cheap devices this is not the top level. But the native android application (quite complex) is loaded in 1.4 sec. This is a problem of architecture (in my opinion).
    For my app:
    - Without AOT I had a boot time of 10 seconds
    - with the included AOT - 5 seconds.
    Any ideas, it's very long :(.

  • RkhKrRkhKr Member ✭✭

    Im using Fast-Renderer in my Xamarin-App. But Fast Rendering doesn't work with Custom Renders. Someone can help me why its wrks only with normals Xamarin Controls but doesn't wrk with custom Renders Controls. HELP ME

  • batmacibatmaci DEMember ✭✭✭✭✭

    @RkhKr said:
    Im using Fast-Renderer in my Xamarin-App. But Fast Rendering doesn't work with Custom Renders. Someone can help me why its wrks only with normals Xamarin Controls but doesn't wrk with custom Renders Controls. HELP ME

    i have some custom renderes and fast renderers work for me. it can be some specific problem. you should define it better

  • RkhKrRkhKr Member ✭✭

    Sir can you share any example or sample project. it can be very helpful for me. i tried many examples but it didnt work.

  • batmacibatmaci DEMember ✭✭✭✭✭

    @RkhKr the one having the problem is you. you should create another post here or Stackoverflow and if you believe that it is a bug, create an issue on https://github.com/xamarin/Xamarin.Forms/issues.

  • masahikomiyasakamasahikomiyasaka JPMember ✭✭

    @batmaci , your "work" means your custom renderer control creating just one view?
    I have a custom render, but it splits into two views with "fast renderers", not one.

    @RkhKr ,you may be able to change the custom renderers to effect.
    I changed my custom renderers to effect to reduce views.

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    Now that 3.0 is out, has anyone re-checked startup times?

    I just ran a series of benchmarks with several classes of devices and different Android versions, and I'm seeing that Xamarin.Forms 3.0 is 1.2x- 1.8x faster on cold start than the previous version.

    With AOT+LLVM I see 2.8x to 4x faster cold start times than without.

    I'm timing from when the app is tapped to when the first ContentPage appears using Android Device Monitor LogCat.

    Devices:
    Nexus 5
    Pixel
    S6

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @DavidOrtinau:
    1.2x- 1.8x faster without doing special hacks and use AOT+LLVM (what is no solution in my eyes as also the app size matters) would be good news and fulfill the meaning of this thread (show progress of making .forms faster) :smile:
    @batmaci:
    It would be nice, if you could post also the startup times with the old version and further post the old version x.x), so that we can see the difference here :wink:

  • ZenDroidZenDroid USMember ✭✭✭

    Now AOT compile not working for me. Any tips I can not release an update for my app.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭
    edited June 2018

    @ZenDroid What issue are you having?

    I just started using AOT with my app's lastest release and super pleased with results.

    I did a few other things and got my startup times between 45% - 63% faster :)

  • batmacibatmaci DEMember ✭✭✭✭✭

    @ZenDroid What issue are you having?

    I just started using AOT with my app's lastest release and super pleased with results.

    I did a few other things and got my startup times between 45% - 63% faster :)

    and your app size is 3 times bigger probably? please check installed size, not apk size. it goes 3-5 times bigger

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @batmaci said:
    and your app size is 3 times bigger probably? please check installed size, not apk size. it goes 3-5 times bigger

    Not being a smart arse... Genuinely interested in what others thing about app size... Who gives a darn about the installed size if it runs 3-5x faster? I mean does anybody really care what the app size is? The typical Facebook update is nearly 200mb. The typical Android or iOS device is a quarter terabyte.

  • AdamMeaneyAdamMeaney USMember ✭✭✭✭✭

    @ClintStLaurent I will say that I have never had an Android device with that much storage.

    Mine have usually been 32 GB, with this last one being 64.

    I don't know anyone who got one that is larger than that, so a 256 GB phone seems to be kind of crazy. I would never fill that guy up, and at least where I am that would have cost me another several hundred dollars.

    App size is semi important, although I will admit I am nowhere near filling up this one. But anyone with a low end phone is probably worrying about such things for sure, and I would bet most middle of the road phones do as well.

    Anecdotally, my boss was getting annoyed when our application got into the mid 20 MB size, so it is on some people's minds.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited June 2018

    @AdamMeaney said:
    @ClintStLaurent I will say that I have never had an Android device with that much storage.

    Mine have usually been 32 GB, with this last one being 64.

    I don't know anyone who got one that is larger than that, so a 256 GB phone seems to be kind of crazy.

    Wow. Really? Even my old iPhone7 (now a hand-me-down to my wife) was 256gig. As is my current iPhone8plus
    https://www.amazon.com/Apple-iPhone-Unlocked-Black-Version/dp/B01LXU06XT

    My iPhone6 before that was 128gig - and now we're going be a few years.

    I would never fill that guy up, and at least where I am that would have cost me another several hundred dollars.
    Anecdotally, my boss was getting annoyed when our application got into the mid 20 MB size, so it is on some people's minds.

    Then again... Some people have no clue about what they have on their phones. They wonder why they are out of memory when their entire music collection and 15 years of photos are on their phone.

    These are the same people that can't figure out why their 3tb drive on the PC is full when they never throw anything away - or don't know they have to empty the trash after putting stuff in it.

    All I'm saying is... That for some applications trying to code to $4 phone from India shouldn't be the goal. There is a certain minimum standard of acceptability. Just like I'm not going to own a 1976 AMC Pacer ever again. Once you start having decent gear you just can't go back.

  • AdamMeaneyAdamMeaney USMember ✭✭✭✭✭

    If your goal is standard US consumer at least, you can probably expect at least 32 GB. When looking at all the newly purchasable phones on Verizon for instance, most new ones start at 64 GB.

    I just know that everyone I know who isn't too tech savvy buys the lowest GB they can, and never for any reason deletes anything.

    If we had all devs making 200+ MB apps, the amount available gets smaller.

    Definitely depends on your user base on what you should do.

  • batmacibatmaci DEMember ✭✭✭✭✭

    yes this is the biggest dilemma for me. performance over size. I mean regarding performance we arent talking about 2 times better performance but performance gain for AOT is quite minimal if you already handle your start up yourself very well. I gave the numbers above on my screenshot without AOT. if i use AOT, for new phones it is 1-2secs better, older versions have 4-5secs better but there comes the problem, apk size grows from 17mb to 27mb with all full linking, splitting, bundling etc. installed size from 30mb to 100+mb, can you see the difference? my performance gain is minimal while size gain is 3+ times more. I just dont feel good about it. Unless you have a great idea, people will not install your app while there is a natively programmed similar app with even 5 mb. Ok, I agree that many dont check installed size, most of the people check, apk size before they install. Believe me they do. people arent clueless as you may think.
    On the other hand, yes I agree that you should target countries like Usa, canada, Uk, Germany, France, Australia, Singapore, Scandinavians etc if you want to make purchases.. no other countries are spending 2-3 euros, dollars for your in app purchases because in their currency, this is already a lot of money for them. So for those targeted countries 100mb installed can be also ok.
    Regards to facebook, i think that facebook already saw that it disturbs many and they have facebook lite because of that which is like 5mb i think.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭
    edited June 2018

    @batmaci said:

    @ZenDroid What issue are you having?

    I just started using AOT with my app's lastest release and super pleased with results.

    I did a few other things and got my startup times between 45% - 63% faster :)

    and your app size is 3 times bigger probably? please check installed size, not apk size. it goes 3-5 times bigger

    Yes my app size grew from

    • 39 MB - Before optimizations (slow start up time)
    • 64 MB - AOT, LLVM, Bundle Assemblies, compressed images - startup improved by 26% to 51% (depending on the device type)
    • 30 - 32 MB - AOT, LLVM, Bundle Assemblies, Separate package per ABI - startup improved by another -4% to 22%

    Overall start up performance has improved by 50% - 63%.

    I have always run ProGuard and Link SDK Assemblies only. I also upgraded to AppCompat with the latest release.

    I'm very happy with the result, the app actually feels much more responsive. One of my tech buddies, still wants it to be smoother and faster, but the typical user should find the app perfectly acceptable.

    I'm looking forward to Fast Renderers (as its still in experimental) and other improvements in the future.

    I've been using Xamarin.Forms since the beginning and its come quiet a long way. It's also great to see the community improvements included in the releases.

    Please let me know if you have any other questions.

  • batmacibatmaci DEMember ✭✭✭✭✭

    @AnthonyRamirez how can you have smaller version using AOT? 39 mb was without linker, without proguard etc probably right? I assume thats true and using those, your app should be actually 15 mb without Aot

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    @batmaci

    The size went down after using the Separate package per ABI setting (AndroidCreatePackagePerAbi). I had no choice as I added an additional Abi and the app size grew too much.

    I don't love that I have different version numbers, but I'm happy the App Center hides this from me and just uses the versionName.

  • batmacibatmaci DEMember ✭✭✭✭✭

    @AnthonyRamirez said:
    @batmaci

    The size went down after using the Separate package per ABI setting (AndroidCreatePackagePerAbi). I had no choice as I added an additional Abi and the app size grew too much.

    I don't love that I have different version numbers, but I'm happy the App Center hides this from me and just uses the versionName.

    i am also using split packages and i think that it is even better usage because you can even see split statistics about each package in google console as well as if you are using app center.

1234568»
Sign In or Register to comment.