Search code examples
performanceapplication-variables

Application variables and performance?


Would usage of more number of application variables affect the performance of an asp.net website ?


Solution

  • If you create large objects during run-time it definitely affects performance.

    If you create them all during initialization they can affect run time if you access one then another then one and another back and forth which may cause paging (look up the term).

    Variables like int, char, double, ... don't affect performance, large arrays of them can.

    I recommend you read about how the cache works and how operating system allocate/deallocate memory.