Easy to (mis)use API

Posted by: Poupous blog, on 04 Mar 2011 | View original | Bookmarked: 0 time(s)

Here's another take at reducing string allocations inside Gendarmeusing the newLog Profiler.This time I focused on a very helpful, but easy to abuse, API: StreamReader.ReadLine. Similar methods suffers from similar fates.The .NET framework has quite a few helpers like this one. They work great when quickly hacking a solution but they also have serious limitations in the real world.E.g. how long is a line ? from a Stream it could be infinite, eventually leading to a OutOfMemoryException.Same goes...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Mono | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 277 | Hits: 3

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD