Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-833

ASTStringLiteral.interpolateimage consumes large amounts of memory [PATCH]

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.0
    • Component/s: Engine
    • Labels:

      Description

      interpolateimage is only used in the init method of ASTStringLiteral and thus should not be an instance member of this class.

      The assignment

      interpolateimage = image + " ";

      is really bad since it allocates a new string objects that are responsible for a great part of the objects' retained heap size.

      1. VELOCITY-833.patch
        3 kB
        Jarkko Viinamäki

        Issue Links

          Activity

          Hide
          claude Claude Brisson added a comment -

          fixed by commit 1753736

          Show
          claude Claude Brisson added a comment - fixed by commit 1753736
          Hide
          wyla Jarkko Viinamäki added a comment -

          I think Alexander is right. There's no reason to keep interpolateimage variable as class variable since it's only in init method scope. Some unnecessary work and memory allocation can be also avoided by rearranging some lines of code.

          This patch should fix the issue and also thus reduce memory consumption quite a bit.

          Show
          wyla Jarkko Viinamäki added a comment - I think Alexander is right. There's no reason to keep interpolateimage variable as class variable since it's only in init method scope. Some unnecessary work and memory allocation can be also avoided by rearranging some lines of code. This patch should fix the issue and also thus reduce memory consumption quite a bit.

            People

            • Assignee:
              claude Claude Brisson
              Reporter:
              veita Alexander Veit
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development