When I use the Developer Tools in Chrome to collect JavaScript CPU Profiles, I am getting two mysterious warnings on functions:
I was getting a lot of the 'Not optimized: optimized too many times' warnings and these functions were running much slower than they should have.
I was able to fix these functions by doing these things:
Removing unused variable declarations
Removing function calls from loops that iterate many times (>1000 i suspect)