azchohfi/azure-wp-rest — pull request #1 by semihokur (2013-08-21 08:20:37+00:00)
Title: Improved async/await support

I am Semih Okur, a PhD student in the CS department at the University of Illinois. I'm currently doing research on asynchronous programming in phone applications. I developed a tool that automatically improves async/await usages by doing transformations.

The tool found some opportunities in your application. First, it added "ConfigureAwait(false)" to each await statement in order to decrease overhead of capturing the context because the method is not updating UI elements after these statements.

Second, it added async call for stream.Write(). Even though memorystream is fast to write on it, it sometimes cause sluggishness when the content is too large.

The tool did not introduce async call into read/write calls in "while" loop because of excessive continuation overhead. However, in some context, developers still introduce async read/write calls in "while" loop by using ConfigureAwait(false). If you are also interested in those, the tool can transform these also.