Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improved async/await support #1
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.