<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory usage when creating many tables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105369#M38886</link>
    <description>&lt;P&gt;Regarding the last question, you could use data table subscripting:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make a starting table to update later
mat = J(10, 5, RandomNormal());
dt = AsTable(mat);
dt &amp;lt;&amp;lt; setName("My Table");

// Update the last four columns of dt (using data table subscripting) with new values
Wait(3);
mat = J(10, 4, RandomNormal());
dt[1::10, 2::5] = mat;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Jan 2019 10:08:41 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2019-01-10T10:08:41Z</dc:date>
    <item>
      <title>Memory usage when creating many tables</title>
      <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105087#M38855</link>
      <description>&lt;P&gt;When creating many tables and then closing them JMP seems to keep the tables or some remnants in memory. The memory is sometimes released after a while. I ran into this when simulating a measurement situation with noise sources. JMP din't crash but after RAM ran out windows started swapping to HDD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the simplest example where I was able to repeat the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: is this expected behaviour and/or did I do something funny?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note to anyone encountering the same: uncommenting the Wait(0); removes the problem, but seems to have a small (~10 %) performance penalty at least in the case where this was a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For (i = 1, i &amp;lt;= 100000, i++,
	dt = New Table("Name of the table",
		New Column("Name of the column", Set Values(1::20000)),
	);
	// Do stuff
	Close(dt, "No Save");	
	//Wait(0);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;JMP 14.0.0 64-bit, Win 10&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:13:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105087#M38855</guid>
      <dc:creator>Niko_Porjo</dc:creator>
      <dc:date>2023-06-10T23:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage when creating many tables</title>
      <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105114#M38860</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13622"&gt;@Niko_Porjo&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try to include an "invisible" or a "private" flag when you open so many data tables. Making Data Tables "invisible" will help you see some improvement and making it "private" will help you see significant improvements.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:11:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105114#M38860</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2019-01-09T14:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage when creating many tables</title>
      <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105115#M38861</link>
      <description>&lt;P&gt;Why create a new table in each iteration? You could create a data table before iterating and the update the contents in each iteration.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:13:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105115#M38861</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-09T14:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage when creating many tables</title>
      <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105360#M38885</link>
      <description>&lt;P&gt;Mostly because I used parts from scripts I had already written before and didn't want to change them. In many cases I prefer slow scripts over working on the script to make it faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In some cases the data tables get their data from matrices:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = As Table(matrixWithData, private);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to easily put the data into an existing data table? That would make the changes relatively simple.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:23:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105360#M38885</guid>
      <dc:creator>Niko_Porjo</dc:creator>
      <dc:date>2019-01-10T09:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage when creating many tables</title>
      <link>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105369#M38886</link>
      <description>&lt;P&gt;Regarding the last question, you could use data table subscripting:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make a starting table to update later
mat = J(10, 5, RandomNormal());
dt = AsTable(mat);
dt &amp;lt;&amp;lt; setName("My Table");

// Update the last four columns of dt (using data table subscripting) with new values
Wait(3);
mat = J(10, 4, RandomNormal());
dt[1::10, 2::5] = mat;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jan 2019 10:08:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Memory-usage-when-creating-many-tables/m-p/105369#M38886</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-01-10T10:08:41Z</dc:date>
    </item>
  </channel>
</rss>

