[
https://issues.apache.org/jira/browse/VELOCITY-731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745246#action_12745246
]
Nathan Bubna commented on VELOCITY-731:
---------------------------------------
I'm not sure if anyone else has been bitten by this, but it is the first i
recall being reported. And yeah, 100% worse vs 20-30% better is a massive
price to pay for consistency in what is largely a corner-case. Perhaps this
calls for a config switch. I don't like proliferation of config options for
corner cases, but the reality that this is a behavior change that would
essentially require some people to alter their existing templates to maintain
performance seems justification enough.
Perhaps a "directive.if.null.tostring = true" as the default, which you could
set to false for the old behavior?
Since you're already writing patches for yourself, is there any chance you'd be
willing to write and contribute a patch for this?
And, out of curiosity, what jdk are you running on?
> Velocity 1.6 performance is degraded by introduced toString() calls
> -------------------------------------------------------------------
>
> Key: VELOCITY-731
> URL: https://issues.apache.org/jira/browse/VELOCITY-731
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6
> Environment: Apache Velocity 1.6.2
> Reporter: Jörgen Rydenius
>
> As part of VELOCITY-531, r686428 introduced frequent calls to toString() just
> to check if toString() != null. If toString() implementations are slightly
> complex, and very frequently executed, these calls will degrade the site
> performance. Are they at all necessary? What kind of object would use null as
> a return value for toString()? Is it possible to remove these toString()
> calls from the velocity code again?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]