1
0
Форкнуть 0
Xamarin.Forms Performance Playground (Layouts, Bindings, XAMLC, etc)
Перейти к файлу
Javier Suárez Ruiz 9c1d9ecaf4 StartupPerformance sample 2019-05-25 13:31:20 +02:00
images Added new charts 2019-05-25 13:27:36 +02:00
src StartupPerformance sample 2019-05-25 13:31:20 +02:00
.gitattributes Initial Commit 2019-05-05 18:01:38 +02:00
.gitignore Initial Commit 2019-05-05 18:01:38 +02:00
README.md Added HttpClient section info 2019-05-09 19:43:19 +02:00

README.md

Xamarin.Forms Performance Playground

There are many techniques for increasing the performance of Xamarin.Forms applications. Collectively these techniques can greatly reduce the amount of work being performed by a CPU, and the amount of memory consumed by an application. This repository describes and discusses these techniques.

(Work in progress)

  • Bindings
  • CollectionView
  • Fast Renderers
  • HttpClient
  • Images
  • IoC
  • Layouts
  • Shell
  • Views
  • Visual
  • XAMLC

HttpClient

Many mobile applications depend on external data making intensive use of the network. Therefore, we are interested in having the fastest possible response when making HTTP requests.

Take the approach of using a single HttpClient instance per server (reuse HttpClient between requests). This will get you better performance.

The results:

HttpClient

This is because will segregate things each server may depend on such as cookies or DefaultRequestHeaders.

A common mistake working with HttpClient is to download json to a string. The problem is that this creates a string of your entire JSON document needlessly.

This has two problems:

  • Depending on the size of the downloaded file to chain, it will affect more than the necessary time.
  • Higher memory consumption.

Images

IoC

IoC

IoC

XAMLC

XAMLC

Code released under the MIT license.