dotNetDave Says… Avoid Going Across the Wire Until Necessary!

Network calls create significant performance bottlenecks in modern applications due to latency and unpredictability. Developers should prioritize chunky communication and batch requests to improve efficiency, as demonstrated through API development experiences. Monitoring usage and enforcing standards can enhance performance, emphasizing that optimal design must consider the entire stack, including network performance.

Performance Tip: for vs. foreach in Microsoft .NET

Collections are one of the most commonly used types in programming. For any program that uses data, you will be dealing with collections. One of the most common things we do is to iterate over the collection to process the data. There are three main ways to iterate over a collection in .NET. for For … Continue reading Performance Tip: for vs. foreach in Microsoft .NET

Converting Value Types

Converting a type like a string to an value type like integer, can easily cause an exception, which is a huge performance killer.  Hopefully you have wrapped the conversion in a Try Catch block, if not your program could take a nose dive and your users will be upset. Consider the code below that converts … Continue reading Converting Value Types

Speed Tip – Creating an Empty String

When setting a string object to an empty string, I did a test and I found that doing this: string ContentFieldName = String.Empty; Is slightly faster than doing this: string ContentFieldName = ""; Your results my vary    Tip Submitted By: David McCarter