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.
Friday, December 14, 2018
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.
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.
Thursday, August 2, 2018
Azure VM SSD Performance is 2.5x Slower than Expected
... and random write speeds are way below what's expected form SSD.
NOTE: the speeds were measured with all kinds of caching and buffering disabled. See updates below for clarifications.
VM Size: Standard DS11 v2 Promo (2 vcpus, 14 GB memory)
Disk attached to the VM is Premium SSD with 150 MB/s max speed:
Sunday, July 29, 2018
2018 15" MacBook Pro SSD Benchmark - macOS, Bootcamp and Windows on VMWare Fusion
Hardware:
- 2018 15 inch MacBook Pro, 2.6 GHz Intel Core i7, Radeon 560X, 16 GB DDR4 RAM, 512 GB SSD
Software:
- macOS High Sierra 10.13.6 (with July update addressing throttling issue), APFS + encryption
- Bootcamp, Windows 10 Pro x64 Fall Creators Update, NTFS
- VMWare Fusion 10.1.1, Windows 10 Pro x86 guest OS, NTFS
Friday, July 27, 2018
Non-cached/non-buffered File Operations (System.IO.FileSteam) with .NET Core on Windows and Mac - Creating Cross-platform Disk Benchmark App
If you have the question of executing disc reads/writes directly against the device and avoid file cache of the OS you're welcome to continue reading this post.
- you create a file a get an instance of FileStream, write a randomized byte array to it and measure the time it took to complete the write.
Intro
Assume you're creating a disk benchmark app you want to execute on Windows and macOS (and might be any other platform) and in your .NET Core project come up with a solution similar to the below C# code snippet:var sw = new Stopwatch(); var file = new FileStream("C:\\testfile.dat", FileMode.CreateNew); var buffer = new byte[1024 * 1024 * 1024]; var rand = new Random(); rand.NextBytes(buffer); sw.Restart(); file.Write(buffer, 0, blockSize); file.Flush(); sw.Stop();
- you create a file a get an instance of FileStream, write a randomized byte array to it and measure the time it took to complete the write.
Friday, August 3, 2012
IE9, HTTPS, "Do not save encrypted pages to disk" option and odd behavior
This option is turned off by default. While I was troubleshooting SSL issues the check box was accidentally turned off and it took several days to find out why we had a bug in a web application reproducible at a single machine.
Web application used ActiveX component to load XSL and render a part of a page. Due to some reasons the part was not rendered properly. Investigations with network monitor showed that there're several requests aborted due to unknown reasons (response status was 200 OK, no any mention on possible cause):
Restoring the option back to FALSE solved the issue. Although it's name doesn't seem to be suspicious browser behavior changes drastically:
1. Any plug-in/add-in running inside IE that uses IE API for network calls may use a special API setting requiring saving the response to disk (INTERNET_FLAG_NEED_FILE) which will be blocked by browser
2. File downloads from HTTPS source will be blocked
In our case ActiveX component which worked for ages was not getting requested data due to the above specifics of how requests are handled with the option turned on. IE 10 seems to have the issues fixed.
See more details in this blog post.
Labels:
aborted requests,
Active X,
Do not save encrypted pages to disk,
enabled,
file download,
HTTPS,
IE 9,
INTERNET_FLAG_NEED_FILE,
network monitor,
odd,
option,
plug-ins,
SSL,
TLS,
unexpected behavior
Monday, July 16, 2012
FireFox extension: ScrollUp
I've recently published a very simple but useful (at least it adds much comfort for me) FireFox extension.
The idea is simple and can be found integrated into some sites (vk.com, habrahabr.ru) and Opera Mini. Whenever you're reading a page deep down you'd probably want to quickly get to the page top (e.g. while reading Facebook News Feed). Most likely you'll have to use scroll wheel or aim a scroll bar. The easier option is to use a pop-up button (which pops at the right moment) to quickly scroll the page up. That's what the plug-in does.
The idea is simple and can be found integrated into some sites (vk.com, habrahabr.ru) and Opera Mini. Whenever you're reading a page deep down you'd probably want to quickly get to the page top (e.g. while reading Facebook News Feed). Most likely you'll have to use scroll wheel or aim a scroll bar. The easier option is to use a pop-up button (which pops at the right moment) to quickly scroll the page up. That's what the plug-in does.
Labels:
Add-on,
DOM manipulation,
extension,
FF,
FireFox,
Getting started,
JavaScript,
sample,
ScrollUp
Tuesday, May 8, 2012
Ripple, BB 10 WebWorks and 'Please enter a valid application id' error
You're developing an application for BB 10 using HTML5, Ripple emulator (for running & debugging your application in Chrome browser) & BlackBerry 10 WebWorks SDK (my version was 1.0.0.7).
Once you set up build settings and click 'Package' button to produce output you get the following error message:
Oh Snap! Build request failed with message: [ERROR] Error: Please enter a valid application id
Once you set up build settings and click 'Package' button to produce output you get the following error message:
Oh Snap! Build request failed with message: [ERROR] Error: Please enter a valid application id
Go to your application source directory and check the contents of config.xml file. Pay attention to the <widget> opening tag:
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.3" rim:header="RIM-Widget:rim/widget" id="SketchPad">
Possible causes for the error:
- Missing id tag
- White spaces in id tag value (registered issue)
As it turned out, WebWorks samples had the id value missing which was leading to build error when using Ripple.
Thursday, April 26, 2012
Ordered test execution error when using Test Manager/TFS
Background:
You've got TFS 2010 Server installed on a virtual machine and fully prepared for building and running automated tests (Build controller, Test Controller, Test Agent are installed and up&running, Build definition is created within TFS etc.).
You've got a test case which has associated automated ordered test. In Microsoft Test Manager this test case is added to a test plan which is set up for automated test runs (Test settings, Test Environment, Build are defined).
The associated with the test case ordered test file resides in a sub folder within the test project, not under root:
Issue:
When you run the test case from Test Manager (started on your work station & connected to remote TFS server) you get an 'Error' state (not 'Failed') for the test and the error message says: Cannot find the test ‘XXX’ with storage ‘..\bin\debug\YYY.dll’
The issue is due to Test Agent searching wrong folder for the tests DLL in case ordered test is not under root.
Resolution:
Put the ordered test file under project root and DLL folder will be resolved correctly.
You've got TFS 2010 Server installed on a virtual machine and fully prepared for building and running automated tests (Build controller, Test Controller, Test Agent are installed and up&running, Build definition is created within TFS etc.).
You've got a test case which has associated automated ordered test. In Microsoft Test Manager this test case is added to a test plan which is set up for automated test runs (Test settings, Test Environment, Build are defined).
The associated with the test case ordered test file resides in a sub folder within the test project, not under root:
Issue:
When you run the test case from Test Manager (started on your work station & connected to remote TFS server) you get an 'Error' state (not 'Failed') for the test and the error message says: Cannot find the test ‘XXX’ with storage ‘..\bin\debug\YYY.dll’
The issue is due to Test Agent searching wrong folder for the tests DLL in case ordered test is not under root.
Resolution:
Put the ordered test file under project root and DLL folder will be resolved correctly.
Subscribe to:
Posts (Atom)






