microsoft.public.dotnet.framework.performance Archive - May 2002
Post a message to this list
Messages
Page: 1
foreach( item i in array) vs for( int i = 0; i < array.Length; i++ ) (3 replies)
microsoft.public.dotnet.framework.performance
I have heard that the C# compiler / .Net JIT is optimized to handle this pattern for iterating over a System.Collections collection: MyType[] myTypes new MyType[ 100 ]; // code to fill collection ommitted ... .... for( int i 0; i al.Length; i ) { doSomething( myTypes[ i ] ); } Question : Will this optimize identically: foreach( MyType myType in myTypes ) { doSomething( myType ); } We have a lot of...
Bad Perf Allocating tons of Small Objects (7 replies)
microsoft.public.dotnet.framework.performance
I have a problem... We have a prototype we are working on where we are reading through an entire file and as each element of the file is read we are creating a new object. The objects are small but we have millions of them. The performance to load and create these objects in a loop is horrible. Watching the perf counters we are spending a great deal of time in the GC as the objects are created... ...
string parameter passing efficiency (4 replies)
microsoft.public.dotnet.framework.performance
..NET expert I was wondering when you pass a string parameter into a function in C# (without the use of 'ref'), does .NET framework always creates a copy of it on the other side? Or does it employ something like copy on the write only algorithm? If former, is it really efficient? So if I need to pass a potentially large string around, should I try to use 'TextReader' like this: void SomeFunc() { s...
Page.Cache question (4 replies)
microsoft.public.dotnet.framework.performance
I want to load a bunch of data from the database, cache it in memory and have it accessible from all pages in an application. In VB6/COM I used shared properties for this, but I am not sure what is the best method to use in ASP.NET. Option 1: serialize the dataset and store in the page cache Option 2: store the contents of the dataset in a collection, serialize it and store in the page cache Optio...
Problem enumerating derived classes (probably missing the obvious) (2 replies)
microsoft.public.dotnet.framework.performance
Hey all, I've got a class &quot;clsDictionaryItems&quot; that inherits NameObjectCollectionBase. I want to make a strongly typed collection that holds instances of &quot;clsDictionaryItem&quot;. Populating the collection is no problem, and I can enumerate using &quot;For x 0 to DictionaryItems.Count 1&quot;, but when I try to use Dim l clsDI as clsDictionaryItem For Each l clsDI In DictionaryItems .... Next I always get an Inv...
Threadpooling Problem (3 replies)
microsoft.public.dotnet.framework.performance
I am an old VB user. I am a great problem solver, but Multithreading is new to me. I am writing a web service. I want to handle client requests, each on a new thread. Unfortunately, all thread pooling, or multi threading examples I see do not show how to return a value. They all fire subs, not functions. Can anyone point me to some sample code that shows how to have a web service do some work and ...
getting the size of allocated memory via Marshal.SizeOf (6 replies)
microsoft.public.dotnet.framework.performance
If I use System.Runtime.InteropServices.Marshal.SizeOf(object) , It should be the size of an unmanaged object. So far I couldn't find a method to get the memory size allocated by a managed class instance. Is there a way to do this ? for my application , I just want to keep track of memory to monitor performance issues. other than that there is no real need. But I guess, this is important. Otherwis...
Trace.axd and Event Queue (2 replies)
microsoft.public.dotnet.framework.performance
I am trying to determine where in my web application I have poor performance. A starting point is looking at the Trace.axd output for various Web requests. I am seeing that a large amount of time is being spent between EndInit BeginPreRender Also, on postbacks, a large amount of time is being spent between End ProcessPostData Begin ProcessPostData Second Try By the names of these events, it seems ...
Performance Issues under Windows 98 (4 replies)
microsoft.public.dotnet.framework.performance
I have written a number of apps that run fine in a windows 2000/XP system. These same apps require almost a minute to start up under windows 98. The window's 98 machines have equivalent ram (128 MB). The application it self is only taking about 3 MB of memory (according to the GC.GetTotalMemory(true) function call). Are there known issues with using .NET under window's 98? I have seen only one oth...
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification