>>Helpful Points on .NET Performance
- Pre-size ArrayLists/Hashtables etc, the performance/memory impact of not doing this is massive if you are working with lists/tables/queues that have 1000's of items
- Build instrumentation into the codebase from the outset - you'll need it later for performance critical applications
- Analysis and understand the problem before you refactor/re-code
- Don't log too little or too much. Logging takes time. The TextWriterTraceListener classes are not thread safe. Adding a queue in front of the TextWriterTraceListener moves you into the area of point 1 above.
- .NET Remoting calls are expensive - the call and the serialization. Chunky not chatty.
- Use the PerfMon counters
文章来源:http://weblogs.asp.net/mdavey/archive/2004/02/25/79788.aspx