When I use the Developer Tools in Chrome to collect JavaScript CPU Profiles, I am getting two mysterious warnings on functions:
I had a
function generate_year_blob(year,action,callback){
...
do_blob({act: action, cb:callback, ...})
...
}
and I called it always using only one parameter like this generate_year_blob(this_year)
.
Those action
(expected to be string) and callback
(expected to be function) were passed to do_blob()
function.
When I changed the the call from generate_year_blob(this_year)
to generate_year_blob(this_year,'',null)
, the 'Not optimized: optimized too many times' warning disappeared.
I didn't find this out immediately, because there were many similar functions generate_month_blob(...)
, generate_day_blob(...)
etc. which were called with all parameters defined.