main.js performance update