Subscribe Bookmark RSS Feed

clear memory after close data table

wongpl

Community Trekker

Joined:

Jun 23, 2011

I am running a scrip to loop  thru 2000 files, every time a file is loaded, the physical memory is increased. Upon ~300 file is being load, the 8G physical memory of my laptop is fully occupied. 

is there any command to unload the data table from memory after we close datatable?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hey, WongPL,

I've got a couple suggestions for you:

1. I assume these 2000 files are JMP data tables, correct?  Are you familiar with the Private option to the Open() JSL function?  If nobody needs to see these 2000 files, you can open them like this:

dt = Open( "$SAMPLE_DATA\Big Class.jmp", Private );

and then use the "dt" reference.  Opening a data table with Private prevents it from creating its window, which consumes a lot of resources.  There is also an Invisible option to Open(), but Invisible causes the window to get created but not shown, so it is not as frugal as Private.

2. If (1) is not an option or doesn't seem to help you, try adding Wait(0); to your script every 10 or 20 iterations and see if that allows memory to have a chance to get freed up.

Let me know if either of those options solves your problem.

Thanks,

Eric

4 REPLIES
Solution

Hey, WongPL,

I've got a couple suggestions for you:

1. I assume these 2000 files are JMP data tables, correct?  Are you familiar with the Private option to the Open() JSL function?  If nobody needs to see these 2000 files, you can open them like this:

dt = Open( "$SAMPLE_DATA\Big Class.jmp", Private );

and then use the "dt" reference.  Opening a data table with Private prevents it from creating its window, which consumes a lot of resources.  There is also an Invisible option to Open(), but Invisible causes the window to get created but not shown, so it is not as frugal as Private.

2. If (1) is not an option or doesn't seem to help you, try adding Wait(0); to your script every 10 or 20 iterations and see if that allows memory to have a chance to get freed up.

Let me know if either of those options solves your problem.

Thanks,

Eric

erichill

Staff

Joined:

Oct 1, 2013

One more thing - it would also help to know what version of JMP you are running.

Eric

wongpl

Community Trekker

Joined:

Jun 23, 2011

Hi, Eric ,

i am using JMP 11. 

I have run further debug today....

Open using invisible option, then close the data table using close ( dt, no save), it solve and unload the datatable from memory.

But here is the part that need some help.

i have created a new window to show some study and then save the new windows study (the entire new window)  as JPG.

SR = New Window("Summary Results",

  OutlineBox(ListOfFiles,

  HListBox

  (

  Vlistbox (

  Outline box ( "XY Plot",.... and continue.....

SR << Save Picture(Mypicpath || ListOfFiles || ".jpg" , JPG);     

after i save it as JPG, the memory increase and stay there...

how to remove JPG file memory from system?

wongpl

Community Trekker

Joined:

Jun 23, 2011

Updated the JMP to ver 11.2 solve the unload JPG file from memory issue.