You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jesus Muros <jm...@rti.com.INVALID> on 2023/01/16 09:48:50 UTC

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

 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μs per invocation with Velocity 1.7. With Velocity 2.3, the same input
and templates take an average running time of 28.1μs 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