improve performance of smoothly.js