0

Like many others Knockout developers before me, I encountered a “slow running script” warning in IE.

Before profiling my client-side script, I wanted to see how others solved similar problems. [Incidentally, here was the best Knockout profiling advice I found.]

  • @RP Niemeyer suggested that PauseableComputeds are useful in these situations.
    • And he's correct. Indeed, PausableComputed are useful in these situations. I implemented a PauseableComputed in my code, and it solved my problem.
  • But afterwards, I discovered the 'throttle' extender by reading this answer.

Here's my two part question:

  1. Was the throttle extender introduced to solve the same problem that PauseableComputeds were trying to solve?
  2. Are both equally good constructs to solve the “slow running script” warning in IE?
Community
  • 1
  • 1
Jim G.
  • 15,141
  • 22
  • 103
  • 166

1 Answers1

1

Yes, the throttle extender added changes to the core in KO 2.0 to help handle this type of scenario.

The only advantage to the pauseable idea is that you can choose when to pause and resume it, rather than using a threshold of time in the extender.

RP Niemeyer
  • 114,592
  • 18
  • 291
  • 211