Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamics AX 2012 not releasing memory
    primarykey
    data
    text
    <p>I am experimenting with exporting the AOT CUS layer as an XPO file. Reference <a href="https://stackoverflow.com/questions/15166313/how-to-mimic-the-aot-export-by-layer-functionality-x">this question</a>. I've run the excellent suggestions from the answers to said question but I am running into "out of memory" issues. I've done some further research and some additional experimentation. Here is a sample of the algorithm I am using to climb down the AOT tree and export only nodes that belong to the "CUS" layer.</p> <pre><code>private void GetAOLHelper(TreeNode baseNode, str baseExportDirectory, int currentLevel, int maxLevel) { int cusLayerTest; int CusLayerValue = 4096; str ExportFileName = ""; str ExportDirectoryName = ""; TreeNode nextNode; if (baseNode != null) { cusLayerTest = CusLayerValue &amp; baseNode.applObjectLayerMask(); if (cusLayerTest &gt; 0) { ExportFileName = baseNode.AOTname() + ".xpo"; this.NodeExport(baseNode, baseExportDirectory, ExportFileName); } else { if (currentLevel &lt; maxLevel) { nextNode = baseNode.AOTfirstChild(); while (nextNode != null) { this.GetAOLHelper(nextNode, baseExportDirectory, currentLevel + 1, maxLevel); nextNode = nextNode.AOTnextSibling(); } nextNode = null; } } } } </code></pre> <p>The crux of this algorithm is as follows: I want to climb down the AOT tree (starting at a particular node) and export any layer that is a "CUS" layer object. I stop climbing down the tree at "maxlevel", meaning I only go X levels deep into the tree. I'm currently only running this algorithm on the "Data Dictionary" node of the AOT tree.</p> <p>The issue I'm facing is that when this job runs, the memory footprint of the AX32.exe process is almost 1 GB. If I run this code against multiple nodes the memory requirement keeps climbing. I'm curious as to why AX is not releasing the memory when the algorithm is finished. My research on Google is coming up with some issues with the AX garbage collection. I'd like to know if there is a way to force garbage collection in AX? If I attempt to export every node in the AOT I run into the aforementioned "Out Of Memory" exception. The memory will not be released until I close the AX32.exe client.</p>
    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.
    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