|
Bugzilla – Full Text Bug Listing |
| Summary: | System.IO.StreamReader.ReadLine is incredibly inefficient (Ximian Bug #76399) | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Wade Berrier <wberrier> |
| Component: | Mono | Assignee: | E-mail List <bnc-team-mono> |
| Status: | RESOLVED WONTFIX | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
Aj, can you provide a SWAMP id? For which package? In general we're not fixing such issues for a released product, this is something we should only fix for our next product. This is for the mono-core package. I'd imagine it is mainly for beagle. Miguel recommended this fix to me Aj. What kind of impact will it have? This is a bug rated as normal and I don't see a reason to submit it. Everything works as intented, no security issue, no segmentation fault... This does not qualify as an update. It dramitically reduces memory usage. How dramitically? do you have some numbers? No answers for this one - let's fix for 10.1. Its already in mono 1.1.10 |
Trow reported the following: Because it creates a new StringBuilder for each line and assembles the string one character at a time, just running this: StreamReader reader; reader = new StreamReader ("a 1.7Mb text file"); string line; while ((line = reader.ReadLine ()) != null) { } Causes 10.7Mb of strings to be allocated. ------------------ Gonzalo has a fix for this in commit revison: 52004