c# - DirectoryInfo.EnumerateFiles() Extreme Slow in Debug Mode -
i've set code in class of project in vs2013 .net framework 4.0
static list<string> f = new directoryinfo(appdomain.currentdomain.basedirectory + "imgdir\\").enumeratefiles("*.*", searchoption.alldirectories).select(x=>x.fullname).tolist();
is very slow in debug mode (100'000 file > 3 minutes). if run without debug fast (<5 seconds).
the debug mode not optimize binary produces , generates additional info aid debugging. release mode enables optimizations , generates less (or no) debug data.
otherwise see nice article stackoverflow :-)
performance differences between debug , release builds
c# performance .net-4.0
No comments:
Post a Comment