views:

542

answers:

2

Hello,

I have developped a PHP system that is using Javascript with the ExtJS library, which provides graphic components in Javascript. So I have a grid which is refresh every 3 minutes by an AJAX call which reloads the grid. Everything works fine on all computers, except for this one computer where, once in a while when reloading the exact same data, displays the "Unresponsive Script Warning" in Firefox.

Full message :

“A script on this page may be busy, or It may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.”

Script : ext-all-debug.js:33841

I've heard of the Antivirus kicking if there is a script protection, but if it was the case it would never work on that machine, right ?

Note that all users use Firefox.

Thanks in advance !

Charles

A: 

Well the EXT Grid is really a bad piece of Engineering when you look at the source code that it generates. Divs with tables with divs and spans.

Does the Firefox instance taht is giving you troubles have extensions that can cause things to run slower. [Firebug/YSlow, AdBlock, Web Dev Toolbar, etc.] Try disabling all of the extensions and see if it runs better.

You should also see what else is running on the computer. Maybe there is some process stealing the CPU cycles.

epascarello
I'm not sure saying that ExtJS grid is a bad piece of engineering will help anyone here, -1 for me.
SleepyCod
Well a bad component could be responsible for the problem, SleepyCod, I am not upvoting though, because epascarello thinks that other processes could possibly affect the browser process and make it think that the page is unresponsive, which is wrong.
Antony Carthy
In my experience, if your CPU is bogged down and your computer is eating up RAM like it is no ones business and the browser is doing a large loop it will hang up and do the unresponsive loop a lot faster than a machine under less load. SleepyCod, look at the code once and run it on a slow machine! :)
epascarello
I honestly think it is Firebug if it is enabled.
epascarello
-1 for calling ext grid a "bad piece of engineering". I'm not sure how you'd expect to create a scrollable, sortable, lockable, groupable table with only semantic table markup.
Juan Mendes
@Juan Sortable, scrollable, and groupable is 100% possible.
epascarello
+1  A: 

Out of curiosity, you might check to see if that computer has a lower value set for dom.max_script_runtime than the others. Not that this should ever need to be set really high, but if it's set really low for some reason on that machine it could cause this inconsistent behavior.

I can't imagine this has anything to do with Ext. How much data is getting loaded into the grid? Although I disagree that the Ext grid is a "bad piece of engineering" (sigh), it is known to bog down page rendering when used with large data sets and/or large column sets. Unfortunately, sometimes tradeoffs need to be made between performance and functionality in the world of JavaScript rich widgets. The Ext grid supports drag/drop columns, customizable nested row layouts, the ability to fit seamlessly into Ext layouts, etc. Supporting all of this in today's browsers is not always simple or quick (although Chrome gives me hope for the future :)

bmoeskau