Friday, December 14, 2018

Xamarin.Forms: Custom Fonts with Android, macOS and WPF

Below you'll see how to add TTF font to Xamarin.Forms 3.0+ app and apply it to UI. In CPDT  there was the issue of ensuring same look of texts across platforms. As it turned out, there's little overlap between standard font families. If you wanted monospace font, you could end up with  monospace on Android, Consolas on WPF and Courier on macOS. Thuogh the fonts are very different. Besides, on macOS you could have compatability issues with standard fonts: some High Sierra fonts are not available in El Capitan or Yosemite (and running app relying in missing font will crash it). The easiest way was to find a freely available font, download TTF, add it to the project and update Xamarin.Forms styles.

Monday, December 10, 2018

Samsung Galaxy S8: Exynos vs Snapdragon (Memory)

Here's the comparison of internal memory and RAM speed using CPDT:

As you can see, Exynos 8895 based Galaxy S8 is slightly stronger in sequential speeds (10-20%), faster in random reads (35%). Qualcomm Snapdragon 835 is faster is random writes (25 - you can notice the difference in how quickly Google Play Apps are installed)%)  25% better in RAM speed.

Benchmark results at CPDT web page.

Friday, December 7, 2018

Android Full-disk Encryption - Performance Penalty Measured

Below you can see 3 charts showing percentage difference in average throughput before and after enabling encryption. Values are given for 4 tests of internal memory (SW - Sequential Write, SR - Sequential Read, RW - Random Write 4KB block, RR - Random Read 4KB block). In other words the charts show how much faster an unencrypted device is.
  • For older and cheaper Mi Max there's a significant drop in storage performance (2x-6x - very similar results to Nexus 6, see bellow).
  • Flagship Mi5 has barely visible slowdown with speed differences fluctuating around 5%.
  • Fresh 2018 Mi8 SE has significant drop of random reads (to 75% of non-encrypted speed) and yet show decent speeds at above 9MB/s.
  • In all 3 cases the most noticeable drop is at random reads.
  • Judging by Mi5 and Mi8 SE one can say that modern Qualcomm hardware provides decent encryption acceleration with no significant slowdown of permanent storage.
  • Though judging by mid-range Mi Max one might expect poor encryption performance in budget phones.
  • It'd be great to have a look at Mediatek and Samsung numbers. There's a suspiciously low performance of Random writes in Exynos versions of Galaxy S8 and Galaxy S9.