[Mono-dev] Too many open files when adding many embedded resources

Tom Philpot tom.philpot at logos.com
Tue Dec 14 19:24:45 EST 2010


Building Mono 2.9 from git master, we're encountering an issue where an assembly with lots of embedded resources (approx 4000), where gmcs is throwing "Too many open files exception".

The culprit seems to be that a new file handle is opened for every embedded resource when it's added. Mono 2.6 doesn't have this problem, so it appears to be a regression

Assembly.cs line 730:
if (res.IsEmbeded) {
var stream = File.OpenRead (res.FileName);
module.Builder.DefineManifestResource (res.Name, stream, res.Attributes);
} else {
Builder.AddResourceFile (res.Name, Path.GetFileName (res.FileName), res.Attributes);
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101214/a71f97df/attachment.html 


More information about the Mono-devel-list mailing list