Does Imports Use Memory?

  • Thread starter Thread starter Christian Reizlein
  • Start date Start date
C

Christian Reizlein

Usually when i finish all my code for a certain class i try to avoid using
imports statements at the top, like imports system.Text or .IO and such and
replace all the calls to those for the complete name

Is true that imports does use memory in your program? Do i save any memory
or improve any performance by avoiding them? or im just paranoid?

-CR
 
Your performance, if it is not there, you have not to wait when it makes
your intelicence.

By instance when you imports system MSHTML you can become crazy about the
amount of members that are showed.

Cor
 
Usually when i finish all my code for a certain class i try to avoid using
imports statements at the top, like imports system.Text or .IO and such and
replace all the calls to those for the complete name

Is true that imports does use memory in your program? Do i save any memory
or improve any performance by avoiding them? or im just paranoid?

-CR

Paranoid, the memory leaks are after you!

Seriously though, like Steve mentioned, the imports statements are all
resolved at compile time and make no difference in the amount of
memory used. Please also be aware that micro-optimizations often lead
to greater more serious problems, especially more difficult and costly
maintenance.

Thanks,

Seth Rowe [MVP]
 
Back
Top