Xamarin Forms Performance

From last 6 months i am working on Xamarin Forms Application development, what i see is, Xamarin forms is Not a Good Option to create the app which has a large data like as 1000 - 5000 records, i Created an App with 5 Xaml Pages and bind it with the Data, here the data is Coming over the API's. So this is my measurement over the Xamarin Forms App Development,

  1. Xamarin forms is only good for those app which is only having View Logic i.e. Application is only to show data to users.
  2. It is also provide a faster development cycle then the Android/iOS application but the rest of the time will be taken to increase the Performance of app.
  3. As per my understanding Xamarin Forms is not good for App's which have large or any kind of heavy data processing like as 1000 - 5000+ records, you will suffer to get the performance of the app.
  4. It is also not good for the real time data transactions on mobile apps, for this kind of requirements prefer Native Environment ( Xamarin Android / iOS)
  5. UI Limitations is the biggest drawback of the Xamarin Forms, for each new UI feature you have to write custom renderers for it and it will take lot of time to appear on the screen.
  6. Xamarin forms not at all provide you the performance as you will get in Native, It is far away for Native app's performance.

Posts

  • TonekodaTonekoda USMember

    Thanks for this info, so native it is.

  • IceJovanoskiIceJovanoski MKMember ✭✭
    edited February 2017

    I don't have anything against this kind of posts, but if you're going to jump to a conclusion about anything you compare, well buddy, make sure to give more info.

    • What devices have you tested on?
    • 1000-5000 records are nothing.
    • Even if you do native development, the code from those custom renderers you hate, will not write itself. I agree that you can find more stuff in completed packages by community members, but all those fancy stuff you're seeing around nowadays in popular mobile apps, don't come written by the gods (the old and the new ones). So no, there are no UI Limitations but yes, there are not many plugins out there.

    And yeah, show some stats, graphs/tables somehow to prove the performance loss you're talking about

  • NMackayNMackay GBInsider, University mod
    edited February 2017

    @IceJovanoski

    Nice post, to make a decision based on one users gripes seems unwise. One of our apps pulls back a lot of bio data for our staff etc, heavy searches etc but no one is complaining about the performance and it's a live app. There's banking apps out there written in Forms & MVVM Light.

    You can write a bad performing native/hybrid as well. Form's doesn't cover every scenario and if you need heavy native handset feature support maybe native is better but for data visualization apps, Forms can do the job very nicely and hopefully some performance wins in the new few releases.

    Our new (very large app (9+ modules) is a Prism Forms app, no major performance blocking issues so far.

  • TonekodaTonekoda USMember

    @NMackay said:

    Our new (very large app (9+ modules) is a Prism Forms app, no major performance blocking issues so far.

    How long does it take to startup?

  • NMackayNMackay GBInsider, University mod
    edited February 2017

    @Tonekoda

    These times are on deployed apps on hardware devices (Samsung S6, iPhone6 & Nokia Lumia)

    About 8 seconds on Android, about 2-3 on iOS and UWP in about 4 seconds, this includes initializing 9 Prism modules, making them load on demand would speed up those times but I need to discover dashboard widgets in the modules based on a users security rights and then use reflection to load the widgets so it's not to bad. The app is entirely XamlC.

    Android is a known issue and Forms 2.3.4 promises x2 startup time improvement.

    Worth doing some tests, there have to be some performance compromises with Forms as your getting a high degree of code sharing and a shared UI.

  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭
    edited February 2017

    If you're loading and/or showing 1000-5000 records at once, you're doing something completely wrong. And going native will not save your app perfomance, even if you write it in C++, or Assembly.

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    I agree that many records at once cant even be consumed by a human. We wrote a control which handles 1000's but again its post loading records based on an infinite scroll. When the scroll nears the end it loads more over and over. What we found is most users would rather search intelligently than scroll past even 2 pages worth of the infinity scroll.

  • WinterCloudWinterCloud GBMember ✭✭✭

    @NMackay said:
    @Tonekoda

    These times are on deployed apps on hardware devices (Samsung S6, iPhone6 & Nokia Lumia)

    About 8 seconds on Android, about 2-3 on iOS and UWP in about 4 seconds, this includes initializing 9 Prism modules, making them load on demand would speed up those times but I need to discover dashboard widgets in the modules based on a users security rights and then use reflection to load the widgets so it's not to bad. The app is entirely XamlC.

    Android is a known issue and Forms 2.3.4 promises x2 startup time improvement.

    Worth doing some tests, there have to be some performance compromises with Forms as your getting a high degree of code sharing and a shared UI.

    If your app has a lot of data to display, how you are displaying them? Do you use ListView? And is there a memory issue on Android for ListView? If not, what control you use to display data?

    My app has a few thousands records to display in different categories, so, in different ListView pages. But I constantly getting out of memory error when switching between pages, pages with or without images.

    Do you know what's the best way to handle/avoid that?

    Thanks.

  • Ben_ReiersonBen_Reierson USMember ✭✭

    I have to agree with the others here asking for more data to back up your claims. I have no issue with the idea that Forms has limitations, but I've been able to get decent performance from it once I learned how it works. Every platform and toolset requires learning how to optimize.

    You also seem to be ignoring some of the new features, like native control embedding, which reduces the need to use custom renderes. But as was mentioned, if you need custom UI code, you'll have to write it one way or another, so I'm not sure putting it in a custom renderer adds much complexity.

    For example - I recently built this app entirely in Forms. It loads ~400 rows, each with 3-6 imags, and performs fine after I spent some time on optimization. It was pretty bad before that. No surprise there, that's pretty much normal for any app, native or not.

    I'm not claiming my app is super complex, but I think it shows you can get good performance from Forms, as do other example apps out there. It's not magic, you still need learn some ticks and write good code.

  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭

    This post really doesn't say anything about Forms in a correct way. I'm here since 2014 and the performance back then was questionable but still ok. If you tweaked it enough and accepted the limitations of the framework.

    I wrote my first Xamarin app in native and the performance is almost the same to a Forms app. Heck I'm currently rewriting the GUI of one of our apps, because with all those changes to the framework I can't just upgrade it from Forms 1.2 to 2.3. Back then I had to use over 25 Custom Renderers and now I only have 2! And with all those Plugins that are out there I did reduce the amount of DependencyServices from 11 to 1!

    Creating fast and stable was never easier as of right now and it only gets better, since it became OSS.

    @BenjaminReierson Can I ask you about your experiences with PCLStorage via PM?

  • shortRevoltshortRevolt USMember ✭✭
    edited April 2017

    This link gives real time preview of Xamarin vs native android as well as iOS on devices.
    https://youtube.com/watch?v=lAjSK5b5lU0

    My Take away points about Xamarin.Forms:
    1. Almost similar performance on iOS and newer android versions.
    2. Little bit lagging on old android devices (especially the startup time).
    3. UI is identical (Obviously. Xamarin gives native binaries).
    4. Features like LINQ, async-await gets you addicted to it.

  • SagarPanwalaSagarPanwala USMember ✭✭✭
    edited April 2017

    I agree with @veeru3112 on all aspect he mentioned.

    @NMackay and @Ben_Reierson : all are talking that performance can be achievable same as native, but no one is providing the guidelines. How we can achieve performance?
    It is not easy all the time to create custom renderers, even for just adding border or border radius to any control is very hard.
    There are many things like this.

    • I can create tab with icon in Native Android and we can also place them on Bottom and it is without any patch or workaround, Google supports it. Then why it is very hard to do it in Forms.
    • Custom animation to Page Transition ?
    • If I want to implement Filter in listview with MVVM structure, I have to take two observable collection and I'm thinking this is also a patch, if not then please provide some sample code to community, how you achieve good performance and what are best practice we have to follow with Forms.
    • I created 4 app in Forms, but I'm not happy with Forms, I like the idea very much but I get frustrated with it.
Sign In or Register to comment.