cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
wongpl
Level II

clear memory after close data table

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
Eric_Hill
Staff

Re: clear memory after close data table

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

View solution in original post

4 REPLIES 4
Eric_Hill
Staff

Re: clear memory after close data table

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

Eric_Hill
Staff

Re: clear memory after close data table

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

Eric

wongpl
Level II

Re: clear memory after close data table

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
Level II

Re: clear memory after close data table

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