Re: Performance degradation after update from Velocity 1.7 to 2.3.

Jesus Muros <[email protected]> Mon, 16 Jan 2023 10:48:50 +0100
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <CAJuJ_RDa8-Va+5z=j1f_zvhgqUddKo02vzZ69jvmWbcrLFcnUA@mail.gmail.com>
--000000000000b3b41b05f25e7f3e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

 Hello everyone

I have been using Velocity 1.7 for a long time. I have upgraded from 1.7 to
2.3. Now, I have significant performance degradation.
I have used a profiler, the invocation to
org.apache.velocity.Template.merge used to have an average running time of
2.6=CE=BCs per invocation with Velocity 1.7. With Velocity 2.3, the same in=
put
and templates take an average running time of 28.1=CE=BCs per invocation.

I am using these properties:

    velocityEngine.setProperty("resource.loaders", "file");
    velocityEngine.setProperty("resource.loader.file.cache", "true");
    velocityEngine.setProperty("resource.loader.file.path", "");
    velocityEngine.setProperty("parser.pool.size", "40");
    velocityEngine.setProperty("parser.space_gobbling", "bc"); // This was
changed after the update
    velocityEngine.setProperty("directive.if.empty_check", "false"); //
This was changed after the update

Is there any known issue related to this performance degradation? Is there
any workaround?

Thanks
Jesus

--000000000000b3b41b05f25e7f3e--