Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved async/await support Edit #6

Merged
merged 2 commits into from Aug 27, 2013
Merged

Improved async/await support Edit #6

merged 2 commits into from Aug 27, 2013

Conversation

semihokur
Copy link
Contributor

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 some await statements in order to decrease overhead of capturing the context because those methods do not require context (like updating UI).

Second, it added corresponding async calls of methods in JsonConvert class under "async" declared methods. For instance, it replaces "JsonConvert.DeserializeObject" with "JsonConvert.DeserializeObjectAsync".

Are you interested in merging this pull request? If not, please let me know why, and I'll try and improve the pull request with your comments in mind.

Thanks,
Semih

penrillian-chrisa added a commit that referenced this pull request Aug 27, 2013
Improved async/await support Edit
@penrillian-chrisa penrillian-chrisa merged commit 2b75b6f into Penrillian:master Aug 27, 2013

return JsonConvert.DeserializeObject<KinveyHandshakeResponse>(json);
return await JsonConvert.DeserializeObjectAsync<KinveyHandshakeResponse>(json).ConfigureAwait(false);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is harmful for performance, synchronous version is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants