Measuring a form's size in memory

You can measure the size of a form in memory, and use this value to determine an appropriate setting for the Translator's form cache (fcCacheSize).

One way to approximate the size of a form in memory is to load the form in the Viewer, fill in all the form data and attach any files, and monitor the process memory usage. However, you should use this value only as a starting point. Subsequent testing will help you refine your setting for optimum performance.

Note: The following procedure is for Windows™ only.

To measure a form's size in memory:

  1. Click Start > Settings > Control Panel > Administrative Tools > Performance to open the Performance monitor.
  2. In the panel, open Console Root > Performance Logs and Alerts and select Counter Logs.
  3. Click Action > New Log Settings to create a new log setting and name it Webform.
  4. In the new Webform window, click Add Counters.
  5. In the Add Counters window, select Use local computer counters.
  6. Set Performance object to Process.
  7. Under Select counters from list, select Private Bytes.
  8. Under Select instances from list, select java.
  9. Click Add.
  10. Click Close to close the Add Counters window.
    The Webform window now lists:
    • \Process(java)\Private Bytes
  11. Click the Log Files tab and set Log file type to Text File (Comma delimited).
  12. Click the Schedule tab and set Start log to Manually (using the shortcut menu).
  13. Click OK to close the Webform window.
    Keep the Performance window open.
  14. Stop all WebSphere® Application Server instances, including the instance hosting the Translator.
  15. Open the Windows Task Manager and make sure no java.exe processes are running.
  16. Start the Translator service.
  17. Open a Web browser to http://localhost:8085/translator/Translate?Action=toolbelt.
    This initializes the API and sets a baseline for memory usage.
  18. In the Performance window, select Webform and click Action > Start to start the counter log, and then wait two minutes to allow the counter to record the baseline memory usage several times.
  19. Use your Webform Server sample application (http://localhost:8085/Samples) to open the form you want to measure, and then wait two minutes to allow the counter to record the memory usage several times.
  20. Close and restart your Web browser, and then repeat the previous step. Do this two times, for a total of three form opens.
    This will produce enough memory measurements for you to calculate an average value.
  21. In the Performance window, select Webform and click Action > Stop to stop the counter log.
  22. Open the log in a spreadsheet program or text editor.
    (The default location for performance logs is C:\PerfLogs.)
  23. The log of memory usage should indicate three spikes, one for each time you opened the form. For each spike, calculate the increase in memory usage. Then average the three increases in memory usage.
    This value is the approximate size of the form in memory.