180 likes | 311 Views
DEV 335. Improving Your Microsoft ASP.NET Application Performance with Asynchronous Pages and Actions . Tiberiu Covaci Senior Technical Trainer Many-core. Who am I?. Tiberiu ’Tibi’ Covaci Software engineer, over 20 years experience MCT since 2004, teaching .NET Researcher at KTH
E N D
DEV 335 Improving Your Microsoft ASP.NET Application Performance with Asynchronous Pages and Actions Tiberiu Covaci Senior Technical Trainer Many-core
Who am I? • Tiberiu ’Tibi’ Covaci • Software engineer, over 20 years experience • MCT since 2004, teaching .NET • Researcher at KTH • Sweden .NET User Group Leader • INETA Country Lead for Sweden • Telerik MVP & Insider • @tibor19 #msteched
Agenda • ASP.NET Page lifecycle • Load test your application • Asynchronous pages • Asynchronous actions • Async support in C# vNext
ASP.NET Page lifecycle Init Load PreRender PreRender Complete
ASP.NET Asynchronous Page lifecycle Init Load PreRender Async calls PreRender Complete
Synchronous vsAnsynchronous • Synchronous • Call method => Wait for result • One method at a time • Easy to program/understand • Asynchronous • Call method => Return right away • Result / method completion provided via callback • Run several methods at the same time • Scalability • Harder to program
Async support in C# vNext • “Looks like” synchronous programming • Uses Task/Task<T> behind the courtains • Two new contextual keywords • async marks a method as asynchrnous • await yields control while waiting on a task to complete
Summary • ASP.NET Page lifecycle • Load test your application • Asynchronous pages • Asynchronous actions • Async support in C# vNext
tibi@multi-core.net http://blog.multi-core.net http://msdn.com/concurrency Thank you
Web Track Resources • http://www.asp.net/ • http://www.silverlight.net/ • http://www.microsoft.com/web/gallery/ • http://www.iis.net/ • http://weblogs.asp.net/Scottgu/ • http://www.hanselman.com/blog/
Resources • Connect. Share. Discuss. http://northamerica.msteched.com Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers • http://microsoft.com/technet • http://microsoft.com/msdn