autoeventwireup performance cost

后端 未结 4 1164
情书的邮戳
情书的邮戳 2021-01-12 10:35

I have been looking at improving my asp.net page performance, is it worth changing autoeventwireup from true to false and adding the event handlers or is the performance pen

4条回答
  •  心在旅途
    2021-01-12 11:23

    The wireup isn't done at compile-time. It's done at runtime. As described in this article:

    http://odetocode.com/Blogs/scott/archive/2006/02/16/2914.aspx

    There IS a performance penalty because of the calls to CreateDelegate which must be made every time a page has been created. The performance hit is probably negligible, but it does exist.

提交回复
热议问题