Uploaded image for project: 'Apache Taverna'
  1. Apache Taverna
  2. TAVERNA-256

OutOfMemoryException on multiple Replace Nested Workflows / Import

    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Taverna Workbench

    Description

      The "Replace nested workflows" dialogue seems to consume 13 MB or more for every time the dialogue is brought up, when the workflow that is being edited has multiple nested workflows. The memory does not seem to be freed, and is held by Batik SVG for the diagram preview in the dialogue.

      See attached workflow.

      Some workflows experience even higher consumption, for instance http://www.myexperiment.org/workflows/2653

      To reproduce:

      Open the attached workflow. Right click on one nested workflow and select "Edit nested workflow". Do a minor change, such as adding or removing a string constant. Click Save. Now go back to the main workflow, and for each of the other nested workflows, right-click and select "Replace workflow" - when the dialogue appears, select the last open and the dropdown list to find the already open nested workflow.

      Measure in jProfiler memory usage and allocation hotspots - with a GC reset and memory allocation off/on again after the first replacement. (To ignore initialisation costs). Finally do a double GC reset again, and check out Memory -> Allocation tree - select only Live objects.

      Numbers mentioned here are for 64-bit Java 6 on Ubuntu Linux.

      Now every replaced nested workflow seem to have increase these numbers and the total memory used by the VM - see screenshot.

      Suggested short-term fix is to remove the diagram preview and the preview-loading-thread from the Import/Replace dialogue.

      Note that there is no increase in threads that are Alive afterwards, so the increase memory must be kept by a static or one of the existing SVG threads.

      Alan says that opening and closing workflows does not have a similar problem. Stian remembers that in that code there is something that explicitly clears up some SVG stuff onDispose() - do we need a similar thing in the import dialogue?

      Attachments

        Activity

          People

            Unassigned Unassigned
            stain Stian Soiland-Reyes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: