Say I have following like call stack of async methods:
async Task<T> Method1()
{
return await Method2();
}
async Task<T> Method2()
{
return await Method3();
}
async Task<T> Method3()
{
return await httpClient.ReadAsync(...);
}
Since only Method3 has real Async IO request. Can I just await once in Method1 as bellows? And will below approach improve the performance a bit?
async Task<T> Method1()
{
var task = Method2();
return await task;
}
Task<T> Method2()
{
return Method3();
}
Task<T> Method3()
{
return httpClient.ReadAsync(...);
}