A script on this page is causing your web browser to run slowly - heeeeeeeeelp

2,276 views
Skip to first unread message

Simone Basso

unread,
Sep 21, 2011, 3:12:05 AM9/21/11
to knock...@googlegroups.com
IE7/8 keep showing javascript popups with the following message
---------------------------------------------
Stop running this script?

A script on this page is causing your web browser to run slowly.
If it continues to run, your computer might become
unresponsive.
----------------------------------------------

How do I fix this in IE8?

I saw this KB http://support.microsoft.com/kb/175500 but it's unrealistic to ask all my customers to fiddle with the registry...
Is there a way to do some performance analysis and understand if I'm using knockout in the wrong way? 

Gopal Patel

unread,
Sep 21, 2011, 3:13:15 AM9/21/11
to knock...@googlegroups.com
share some code to understand what is causing the problem.

Simone Basso

unread,
Sep 21, 2011, 4:16:38 AM9/21/11
to knock...@googlegroups.com
It's just a very complex form, with a lot of binding.
Cannot share any of it but I Can try to replicate the problem in jsfiddle

Gopal Patel

unread,
Sep 21, 2011, 4:18:08 AM9/21/11
to knock...@googlegroups.com
also try profiling your code in chrome dev tools

Tom Thorp

unread,
Sep 21, 2011, 6:22:42 AM9/21/11
to knock...@googlegroups.com
I have similar issues, especially with IE7  To hide some of the delay from the users, I've changed call ko.applybindings so it doesn't do the apply all at once. There is an option to applybindings to selected DOM elements.

So what i'm doing is that I call ko.applybindings to section of the DOM that is immediately viewable by user.  Then, after a short time delay, bind the to the rest of the DOM.  

Good luck with your problems.

Gopal Patel

unread,
Sep 21, 2011, 12:58:41 PM9/21/11
to knock...@googlegroups.com
there is one interesting thing I tried, while I was looking for performance for my list application...using this


article. see at the bottom, the fastest way was to directly write to style elements.

so, I tried using <style data-bind="text:calculateStyle"></style> and use a function to calculate 
style in real time. It Worked!! and it was fastest. so all you wanted is a show hide or dom manipulation. this is the best. 

Simone Basso

unread,
Sep 21, 2011, 1:14:12 PM9/21/11
to knock...@googlegroups.com
will test it tomorrow when I go back to work.
thanks guys

mcoolin

unread,
Sep 21, 2011, 7:38:58 PM9/21/11
to knock...@googlegroups.com
You need to break up the work more. you need to ensure some time for the browser to refresh, usually using setTimeout to delay execution.

Without seeing the code its hard to make concrete suggestion but whatever your doing is not working efficiently or trying to do too much at once. Been there. IE 7 is so slow too.
Reply all
Reply to author
Forward
0 new messages