Hello,

As a heavy user of Velocity templates in many performance critical apps, I'd say 20 - 25 % is significant as you can do quite well without decimals by performing maths in tools, which was this original idea and always faster than in templates. 2 - 2.5 % would be acceptable.

-- Ilkka


Will Glass-Husain wrote:
Hi,

Well, after doing a miscellany of patches in the last few weeks I'm tackling the decimal number patch. (Bugzilla #25874) We've discussed this endlessly in the past. I've been using this in production code for almost a year. The remaining issue (raised by committer dlr) is that of performance.

I wrote some simple test code, and discovered there does appear to be a performance drag with the number patch. With caching turned off, there is no significant difference. With caching on, merging templates with the number patch is about 20-25% slower.

I'm really not sure why. Interestingly, the template doesn't matter - the time is almost the same for a integer-math heavy template or an empty template.

Methodology. I merged a template 1000 times (loaded from the ClasspathResourceLoader). Results for Velocity 1.4 and SVN head were almost identical. Adding the number patch raised the time to do the merging from 488 ms to 604 ms. I ran this a number of times, the timing was pretty consistent.

Before delving further into profiling, I'd be interested in comments. Is this significant?

Best, WILL

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to