While opening large files, OS 2200 IDE for Eclipse can run out of memory, prompting you to restart Eclipse. With this file handling enhancement feature, the heap size is monitored before opening or parsing a file or while decorating the editor contents.
The editor scalability feature enables you to fine-tune the behavior of editors before Eclipse can run out of memory. Currently, editor scalability is applied while opening a file using "File Open With..", using OS 2200 File Explorer, or using OS 2200 Explorer methods and displaying the file contents in an editor.
Note: This feature is not available if you use a third-party editor. For more information, refer to the editor scalability options available in the editor you use.
To configure editor scalability, do the following:
Click OS 2200 > Configure Editor Scalability.
In the Configure Editor Scalability window, enter the following information in the respective text box:
Free Memory Factor (FMF): It
is the percentage of free memory against the total available memory
required to perform a memory-intensive operation such as opening
a file, creating an editor, or decorating the contents of a file
in an editor. If sufficient free memory is not available, you
might not be able to open files, and sometimes the file content
appears undecorated in the editor. If you notice such a behavior,
it is recommended to close all nonessential editors.
Note:
The default value is 20. Although a value between 10-20 is sufficient,
it is recommended to provide a higher value (for example, 30)
for less than 512 MB of heap size.
File Size Factor (FSF): It is
the free memory to the file size ratio. You cannot open a file
if the free memory to the file size ratio is less than this value.
Note:
The default value is 6. Although a value between 6-15 is sufficient,
it is recommended to provide a higher value (for example, 20)
for less than 512 MB of heap size.
Click OK to apply the configuration.
When a low memory is detected, a message indicating that the Eclipse instance is running low on memory appears on the status bar. Depending upon the execution point, this feature takes an appropriate action to avoid the out-of-memory error.
In your environment, if you notice that OS 2200 IDE for Eclipse throws an out-of-memory error, then you can set a high value for FMF and or FSF accordingly.
OS 2200 IDE for Eclipse initially checks for files that you open in an editor using "File Open With..", using OS 2200 File Explorer, or using OS 2200 Explorer to determine if there is enough memory to open the file. OS 2200 IDE for Eclipse checks the FMF and FSF values to determine the memory availability. If there is not enough memory, then you are prompted to open the file using an external editor.
Once OS 2200 IDE for Eclipse determines that it is safe to open the file, the value of FMF is again checked while loading the file contents into the editor to determine if it is again safe to open the file.
If any of the following behavior is observed, you should make the memory available by closing nonessential editors:
COBOL editor—Page is not decorated, COBOL file is not parsed, or the COBOL editor features are restricted.
Plus editor—Page is not decorated.
Before displaying the editor, if OS 2200 IDE for Eclipse determines that there is not sufficient memory, then it provides the option to open the file in an external editor.
Note: If you continue to open the files in the editor after observing the behavior, such as page not displayed or page not decorated, Eclipse might run out of memory. Eclipse might also run out of memory while executing some functions in the core Eclipse API.
Perform the following steps to enable the heap status in Eclipse:
On the Window menu, click Preferences from the Window menu.
In the Preference dialog box, select the General option on the left and then select Show the heap status check box under General category in the right pane.
Click Apply and then click OK.
The heap status appears on the Heap status bar. For example, the heap status 18M of 69M indicates that Eclipse has so far used 18 MB out of 69 MB of memory allocated by Java Virtual Machine.