Using Knockout with the Underscore.js template engine...
- When I try to bind 2004 list items to a
ul
DOM element, IE8 chokes and pops up a "slow running script" warning. - At first, I thought that this solution would solve my problem. Unfortunately, it did not.
- So I used Google Chrome's profiler. It claims that my code is spending most of its time in
a.c.options.update
.- So I'm led to believe that the template binding is executing over 5 million consecutive Javascript statements, and that I need to throttle this binding somehow, perhaps with setTimeout statements.
My Two-Part Question:
- Am I pursuing this problem correctly?
- If so, can I throttle Underscore.js's templating engine (inside of the
foreach
which renders myul
DOM element?