Velocity
  1. Velocity
  2. VELOCITY-450

Reduce memory usage for Velocity templates

    Details

    • Type: Wish Wish
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Windows 2000, Jdk1.4.2, Tomcat4.1.29

      Description

      Hi,

      We are using the velocity templates extensively to
      generate HTML reports. Normally our templates size on
      the Disk is around 20-50kb, when it gets loaded into
      Application(Tomcat) memory it turns to 3-5MB.

      As of now we have 500 templates, in near future we are
      planning to increase this to 1500.

      Any Idea why this is happening. Any help in this is
      much appreciated, as this is becoming a bottleneck for
      the scalability of our application.

      Thanks in advance.

      Regards,
      Coumar

        Activity

        coumaravel created issue -
        Hide
        Nathan Bubna added a comment -

        Hi Coumar,

        I've recently been talking about ways to reduce memory usage with someone else on the user list. I've add the highlights of that conversation to the VelocityFAQ:

        See http://wiki.apache.org/jakarta-velocity/VelocityFAQ

        If you have further questions about it, feel free to ask on the velocity-user@jakarta.apache.org list.

        peace,
        nathan

        Show
        Nathan Bubna added a comment - Hi Coumar, I've recently been talking about ways to reduce memory usage with someone else on the user list. I've add the highlights of that conversation to the VelocityFAQ: See http://wiki.apache.org/jakarta-velocity/VelocityFAQ If you have further questions about it, feel free to ask on the velocity-user@jakarta.apache.org list. peace, nathan
        Nathan Bubna made changes -
        Field Original Value New Value
        Summary Why Velocity Templates takes larger memory Reduce memory usage for Velocity templates
        Priority Blocker [ 1 ] Major [ 3 ]
        Issue Type Bug [ 1 ] Wish [ 5 ]
        Hide
        Henning Schmiedehausen added a comment -

        Memory usage is an issue that moves higher and higher on the prio list for 1.6. Retargetting the bug report there.

        Show
        Henning Schmiedehausen added a comment - Memory usage is an issue that moves higher and higher on the prio list for 1.6. Retargetting the bug report there.
        Henning Schmiedehausen made changes -
        Component/s Source [ 12310214 ]
        Component/s Engine [ 12311337 ]
        Fix Version/s 1.6 [ 12310290 ]
        Hide
        tomcat added a comment -

        Hello,

        Are there any updates regarding issue?

        There seems to be almost no development activity in Velocity community.

        Show
        tomcat added a comment - Hello, Are there any updates regarding issue? There seems to be almost no development activity in Velocity community.
        Hide
        Ronald Klop added a comment -

        Hi,

        I fixed something in https://issues.apache.org/jira/browse/VELOCITY-570. But I don't know if this helps for your problem.
        So there is development activity.

        Can you generate and analyze memory dumps of your problem? It is very nice to know what classes are holding what objects which use the memory.

        Ronald.

        Show
        Ronald Klop added a comment - Hi, I fixed something in https://issues.apache.org/jira/browse/VELOCITY-570 . But I don't know if this helps for your problem. So there is development activity. Can you generate and analyze memory dumps of your problem? It is very nice to know what classes are holding what objects which use the memory. Ronald.
        Hide
        Nathan Bubna added a comment -

        I'm guessing this has largely been dealt with via a number of different changes since 1.5. Does anyone still see this as a problem?

        Show
        Nathan Bubna added a comment - I'm guessing this has largely been dealt with via a number of different changes since 1.5. Does anyone still see this as a problem?
        Nathan Bubna made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12381758 ] Default workflow, editable Closed status [ 12551658 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551658 ] jira [ 12552249 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            coumaravel
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development