Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to unregister an event Pin
Martin#19-Jul-07 2:48
Martin#19-Jul-07 2:48 
AnswerRe: How to unregister an event Pin
b_umika19-Jul-07 2:01
b_umika19-Jul-07 2:01 
QuestionGenerating a program ID Pin
Muntyness19-Jul-07 1:49
Muntyness19-Jul-07 1:49 
AnswerRe: Generating a program ID Pin
ekynox19-Jul-07 2:04
ekynox19-Jul-07 2:04 
AnswerRe: Generating a program ID Pin
Luc Pattyn19-Jul-07 2:04
sitebuilderLuc Pattyn19-Jul-07 2:04 
AnswerRe: Generating a program ID Pin
Chintan.Desai19-Jul-07 2:29
Chintan.Desai19-Jul-07 2:29 
AnswerRe: Generating a program ID Pin
Muntyness19-Jul-07 6:50
Muntyness19-Jul-07 6:50 
QuestionCreating directory trees with 1M nodes Pin
ss4219-Jul-07 1:44
ss4219-Jul-07 1:44 
Apologies in advance that may not be a C# issue, but perhaps .NET, NTFS, XP-SP2 or even hardware. You tell me.

I have sucessffuly ran breath-first and depth-first versions of the following C# snippet on different hardware as a precursor to noodling around with databases, SQLite, etc. Seems simple enough. Makes 1M diretcories as in D:dataset/II/JJ/KK where II, JJ, and KK are are 100 nodes each. On my developmemt machine (xp-sp2, 2GB, stable) I have this repeatable condition where when I get to about i = 67 (670K dirs created) the program slows down and then the system becomes unresponsive enough that I must reboot! No chance to use the VS debugger.

I quick format the D: drive before each operation, so the dir construction in this program is being performed on a clean FS with a new MFT. I watch the memory usage (doesn't use much). I've monitored the heap (doesn't use much). I'm perplexed with this system-specific issue; as it is one of the few times (for me) that a user-space program has caused so much trouble. Thoughs on what to try next appreacited. Or pointers to a more appropriate forum. (Yes, I know I should try/catch a possible exception at CreateDirectory; I doubt that is the issue). Thanks!

namespace make_dir_tree
{
class Program
{
static void Main(string[] args)
{
string path;

Stopwatch watch = new Stopwatch();
watch.Start();

for (int i = 0; i < 100; i++)
for (int j = 0; j < 100; j++)
{
for (int k = 0; k < 100; k++)
{
path = String.Format("D:/dataset/{0:D2}/{1:D2}/{2:D2}", i, j, k);
Directory.CreateDirectory(path);
}
Console.WriteLine("i:{0} j:{1}",i,j);
}

watch.Stop();
Console.WriteLine("Elapsed: {0}", watch.Elapsed);
Console.WriteLine("In milliseconds: {0}", watch.ElapsedMilliseconds);
}
}
}
AnswerRe: Creating directory trees with 1M nodes Pin
Luc Pattyn19-Jul-07 2:20
sitebuilderLuc Pattyn19-Jul-07 2:20 
AnswerRe: Creating directory trees with 1M nodes Pin
ss4219-Jul-07 2:22
ss4219-Jul-07 2:22 
AnswerRe: Creating directory trees with 1M nodes Pin
Mike Dimmick19-Jul-07 2:49
Mike Dimmick19-Jul-07 2:49 
QuestionWhat event fired when multiple rows in data grid selected? Pin
Janu_M19-Jul-07 1:41
Janu_M19-Jul-07 1:41 
QuestionHow to know that connection is idle Pin
Mahmoud Zidan19-Jul-07 1:22
Mahmoud Zidan19-Jul-07 1:22 
AnswerRe: How to know that connection is idle Pin
Sathesh Sakthivel19-Jul-07 1:26
Sathesh Sakthivel19-Jul-07 1:26 
GeneralRe: How to know that connection is idle Pin
Mahmoud Zidan19-Jul-07 2:01
Mahmoud Zidan19-Jul-07 2:01 
QuestionPitch Extraction Pin
Guybrush8619-Jul-07 1:15
Guybrush8619-Jul-07 1:15 
AnswerRe: Pitch Extraction Pin
ekynox19-Jul-07 1:57
ekynox19-Jul-07 1:57 
AnswerRe: Pitch Extraction Pin
ekynox22-Jul-07 0:42
ekynox22-Jul-07 0:42 
GeneralRe: Pitch Extraction Pin
Guybrush8622-Jul-07 3:44
Guybrush8622-Jul-07 3:44 
Questionstatus problem Pin
srinivassam19-Jul-07 0:56
srinivassam19-Jul-07 0:56 
AnswerRe: status problem Pin
Eduard Keilholz19-Jul-07 0:59
Eduard Keilholz19-Jul-07 0:59 
AnswerRe: status problem Pin
Martin#19-Jul-07 1:01
Martin#19-Jul-07 1:01 
AnswerRe: status problem Pin
Herman<T>.Instance19-Jul-07 1:09
Herman<T>.Instance19-Jul-07 1:09 
GeneralRe: status problem Pin
srinivassam19-Jul-07 20:59
srinivassam19-Jul-07 20:59 
QuestionRun as? Pin
Captain Trips19-Jul-07 0:55
Captain Trips19-Jul-07 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.