I have to agree with Chad. I don't know what is behind the door of theDirectory.getUsers() but I am willing to bet that if you monitored network packets between your host and the domain that you will see a call out to the domain for every user. That is my hunch. If the userList was truly populated with a UserDirectoryObject fully property populated then it shouldn't take so long to build the table.
-----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Chad M. Gross Sent: Wednesday, January 07, 2004 7:12 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Fastest way to add contents of ArrayList to a DataTable As I stated in my previous post, it is most likely due to your AD reads for the first and last name causing the performance problem not adding the rows to the datatable. For grins, if you run this code excluding the row operations, how long does it take? ArrayList userList = theDirectory.getUsers(); if (userList != null) { foreach (UserDirectoryObject user in userList) { // DataRow drUser = tblUsers.NewRow(); string lastName = user.lastName; string firstName = user.firstName; /* etc */ // tblUsers.Rows.Add(drUser); } } Chad On Wed, 7 Jan 2004 09:21:01 -0500, Scott A. Lawrence <[EMAIL PROTECTED]> wrote: >I used the tracing functionality built into ASP.NET. The process of >populating the DataTable with the contents of the ArrayList is what is >taking up the majority of the time. > >On Wed, 7 Jan 2004 01:18:06 GMT, Erick Sgarbi <[EMAIL PROTECTED]> wrote: > >>Have you tried to use CLRProfiler to find out where your 15 secs is going >to? >> >>Regards, >>Erick Sgarbi >> > >=================================== >This list is hosted by DevelopMentorR http://www.develop.com >Some .NET courses you may be interested in: > >NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles >http://www.develop.com/courses/gaspdotnetls > >View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorR http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com