chiquitinxx / grooscript

Converts your Groovy code to Javascript
https://www.grooscript.org
Other
221 stars 18 forks source link

Speed of conversion optimization #55

Closed ulrichenslin closed 8 years ago

ulrichenslin commented 8 years ago

This improvement to switch from string concatenation to string buffer increases the speed of conversion with at least 100%. Testing on large (over 5000 lines) and complex (several classes, inheritance, traits etc) grooscript files, it was found that conversion speed slows down dramatically. This is due to the fact that Java handles large string concatenation poorly and and the reason for switching to string buffers.

In just running the normal tests on my laptop, the testing time came down from 2 minutes and 28 sec, to 1 minute and 19 sec.

On large files the conversion improvement has been significant.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 94.077% when pulling d4f9cca990417eeca558fe8a2fd12791ebcf4591 on ulrichenslin:master into 69806936b706f2b8a1f9e1744b85c8de7f2c3883 on chiquitinxx:master.

chiquitinxx commented 8 years ago

Cheers, thank you very much! Very good improvement :) Also can be interesting test / improve stringbuffer implementation in the client side.