What is the effect when enabling the Async page tag .NET framework 4.8 web forms?

40 views Asked by At

I am working on a project that is using the .NET framework 4.8 tech stack (I know that it is old) with a web forms project. The project is running fine, but I have a question with consideration to make.

I was memory testing an example .NET framework 4.8 Web forms application, where I was using all async pages and async methods. It was using a smaller amount of memory using the async variants during startup, but also after. I think that this Async page attribute is better and should be used.

However, if it is always better to use the async flag, then why did they put a feature flag behind the functionality? Because you need to manually set the Async=true attribute on all pages like the example below:

<%@ Page Title="YourTitle" Async="True" %>

<asp:Content runat="server">

</asp:Content>

So the question is, I can understand the advantages, but what are the disadvantages? If there were only advantages, they would not put a feature flag behind it (I think) and they would just patch it as a optimization.

Can you help me to find the disadvantages? I cannot find anything that explains that online.

0

There are 0 answers