.NET Framework 2.0 Performance Inspection Questions
From Guidance Share
- J.D. Meier, Srinath Vasireddy, Ashish Babbar, Rico Mariani, and Alex Mackman
[edit]
Common Performance Issues
[edit]
Arrays
[edit]
Asynchronous Processing
[edit]
Class Design Considerations
- Do you use properties?
- Do you define only the required variables as public?
- Do you seal your classes or methods?
[edit]
Code Access Security
[edit]
Collections
- Have you considered arrays?
- Do you enumerate through collections?
- Do you initialize the collection to an approximate final size?
- Do you store value types in a collection?
- Have you considered strongly typed collections?
- Do you use ArrayList?
- Do you use Hashtable?
- Do you use SortedList?
[edit]
Exception Handling
- Do you catch exceptions you cannot handle?
- Do you control application logic with exception handling?
- Do you use finally blocks to ensure resources are freed?
- Do you use exception handling inside loops?
- Do you re-throw exceptions?
[edit]
Locking and Synchronization
- Do you use Mutex objects?
- Do you use the Synchronized attribute?
- Do you lock "this"?
- Do you lock the type of an object?
- Do you use ReaderWriterLocks?
[edit]
Looping and Recursion
- Do you repetitively access properties?
- Do you use recursion?
- Do you use foreach?
- Do you perform expensive operations within your loops?
[edit]
Memory Management
- Do you manage memory efficiently?
- Do you call GC.Collect?
- Do you use finalizers?
- Do you use unmanaged resources across calls?
- Do you use buffers for I/O operations?
[edit]
Ngen.exe
- Do you precompile Windows Forms applications?
- Do you create large shared libraries?
- Do you use application domains?
[edit]
Reflection and Late Binding
- Do you use .NET Framework classes that use reflection?
- Do you use late binding?
- Do you use System.Object to access custom objects?
[edit]
Serialization
[edit]
String Operations
[edit]
Threading
- Do you create additional threads?
- Do you call Thread.Suspend or Thread.Resume?
- Do you use volatile fields?
- Do you execute periodic tasks?
[edit]