You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Steve Lawrence (JIRA)" <ji...@apache.org> on 2018/01/25 19:40:01 UTC

[jira] [Created] (DAFFODIL-1879) Compilation related data structures cannot be garbage collected due to RuntimeData strong references

Steve Lawrence created DAFFODIL-1879:
----------------------------------------

             Summary: Compilation related data structures cannot be garbage collected due to RuntimeData strong references
                 Key: DAFFODIL-1879
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1879
             Project: Daffodil
          Issue Type: Bug
            Reporter: Steve Lawrence
             Fix For: 2.1.0


All the *RuntimeData and DPathCompileInfo constructors accept pass-by-name parameters. Some of the arguments passed into these constructors reference objects that are only needed for schema compilation (e.g. dsom, grammar, etc.). Because they are pass by name, these objects are strong reference and thus cannot be garbage collected, leading to the entire compilation state being store in memory.

Fortunately, those parameters are marked as transient and so when serialized and deserialized they are effectively garbage collected. But if one does not save/reload a schema, lots of wasted memory used during schema compilation will stick around. Pass-by-name parameters cannot be vars, so the simple thing of making them vars and then setting to null does not work. These objects should be restructured to allow them to be garbage collected once compiled.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)