JavaScriptDate.now() しない throttle - JavaScriptで遊ぶよ - g:javascript 同期的に大量に呼び出され、それを間引くことを考えてなかったす。主にイベントの間引きに使ってた。たしかにsetTimeoutで一定期間、処理をロックしちゃうとコスト低そうすね。 Function.prototype.throttle = function(threshold){ threshold = threshold || 100; var me = this; var timer = null; return function(){ if(timer != null) return; timer = setTimeout(function(){ timer = null }, threshold); me.apply(this, arguments);