Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to increase allocated memory ? {The function evaluation was disabled because of an out of memory exception.}
    primarykey
    data
    text
    <p>My goal is to load 1.48 million items from XML files into a in memory generic collections dictionary using C# ASP.NET MVC along with ability to render filter lists to views. Right now it works with about 1/2 million items in my dictionary as a single user in VS debug mode. Any more I get out of memory errors - right now I get: myDictionary.Count results in System.TypeInitializationException - 'The function evaluation was disabled because of an out of memory exception.'</p> <p>In the past it has also been mscorlib.dll during the load from XML to Dict that has complained about out of memory.</p> <p>I have plenty of system memory left, how can I give more to this MVC Web application? BTW, I tried XML to a Perl Dictionary and it works just fine with 1.5 million objects - no problem. I don't wish to write my app in Perl. If Perl can do it, C# has to be able to do it - I just have not been able to find a solution searching the web yet.</p> <p>Example Code:</p> <pre><code>Dictionary&lt;string, msg&gt; masterDictionary = new Dictionary&lt;string, mgs&gt;(); foreach (string file in filePath) { XDocument xdoc = XDocument.Load(file); Dictionary&lt;string, msg&gt; fileDictionary = xdoc .Descendants("msg") .ToDictionary(m =&gt; m.Element("msgId").Value, m =&gt; new msg { msgId = m.Element("msgId").Value, msgType = m.Element("msgType").Value, name = m.Element("name").Value }); //now insert your new values into the master foreach(var newValue in fileDictionary) masterDictionary.Add(newValue.Key, newValue.Value); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload