Thursday 29 October 2015

ASP.NET Tips #42 - Remember that different ways of reading large files have different performance characteristics

Using File.ReadAllBytes() can sometimes be faster than reading a stream obtained by opening a large file such as XML. This can be influenced by factors like whether you need to access all of a file or just a small portion of it. If in doubt, use a tool like Telerik JustTrace or ANTS Performance Profiler to measure the impact of different methods of file access.

No comments :

Post a Comment