c# - DirectoryInfo.EnumerateFiles() Extreme Slow in Debug Mode -


I have put this code in a class of your project in the VS2013 .NET Framework 4.0

  stable list & lt; String & gt; F = new DirectoryInfo (AppDomain.CurrentDomain.BaseDirectory + "imgdir \\"). EnumerateFiles ("*. *", SearchOption.All Directories). Select (x = & gt; x.FullName) .toList ();   

The debug mode (100'000 file & gt; 3 minutes) is very slow if I run fast without debug (& lt; 5 seconds).

Debug mode is not favorable Binary produces additional data to assist debugging and generate it is. Enables release mode optimization and low (or any) additional debug data generates.

Otherwise see this good article from StackOverflow: -)



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -