Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Calling javascript freezes browser window


When I open a webpage with javascript my browser (both IE6 and
FF2.0.0.3) freezes anywhere from seconds to more than a minute. During
that period, the browser is frozen and windows (XP-SP2) is very poorly
responsive. There is no significant CPU-load.

When I disable javascript in FireFox, everything works smoothly
again.

I have uninstalled MS javascript and SUN javascript, however,
javascript is still being executed (when enabled in FF).

- Is there another javascript engine (besides MS-VM and SUN) that
might be screwing up my system?

- Any suggestions how to troubleshoot / fix this problem?

Thanks,

Wouter Pelgrum

On May 21, 1:33 pm, wpelg@gmail.com wrote:

JAVA != JavaScript
On May 21, 3:33 pm, wpelg@gmail.com wrote:

> When I open a webpage with javascript my browser (both IE6 and
> FF2.0.0.3) freezes anywhere from seconds to more than a minute. During
> that period, the browser is frozen and windows (XP-SP2) is very poorly
> responsive. There is no significant CPU-load.

As you still don't get system warning "Script running on this page
takes too much of ..." etc. : my best guess would be that the
offending page is using synchronous XHR call to a very slow /
overloaded server. Nothing to do with Javascript execution per se
then. For a better help instead of "a page" show us _the_ page
demonstrating your problem.

> For a better help instead of "a page" show us _the_ page
> demonstrating your problem.

http://www.rabobank.nl/particulieren/ takes more than a minute to load
with javascript enabled (during which the whole system is practically
unresponsive). With javascript disabled it is loaded in about a
second.
But basically any page with javascript seems to cause some delay,
sometimes only a fraction of a second per javascript item, sometimes
significantly more.

IE and Firefox show the same symptoms, another XP-SP2 PC on the same
network handles the same pages without any problems.

wpelg@gmail.com wrote:
>I have uninstalled MS javascript and SUN javascript, however,
>javascript is still being executed (when enabled in FF).

>- Is there another javascript engine (besides MS-VM and SUN) that
>might be screwing up my system?

You seem to be confusing Java and Javascript. They are completely
different. VMs pertain to Java, not Javascript. (And the MS Java VM is
hopelessly outdated.)

Javascript interpreters are built-in to the browsers. You *cannor*
uninstall the Javascript interpreter that Firefox uses. You can tell
Firefox not to execute Javascript. So the most likely problem here is
badly written Javascript (assuming you really mean JS and not Java) in
the page you're viewing.

--
Tim Slattery
Slatter@bls.gov
http://members.cox.net/slatteryt

> Javascript interpreters are built-in to the browsers. You *cannor*
> uninstall the Javascript interpreter that Firefox uses. You can tell
> Firefox not to execute Javascript. So the most likely problem here is
> badly written Javascript (assuming you really mean JS and not Java) in
> the page you're viewing.

Okay, thanks for the explanation. But then it is even stranger that
both IE and FF experience the same problem with pages (e.g.
http://www.rabobank.nl/particulieren/ but also http://www.nytimes.com)
that have worked fine before and are still working fine on my other
PC. The problem seems to be related to javascript as disabling
javascript in FF solves the delay (but is unworkable for most
websites).
On May 21, 5:31 pm, wpelg@gmail.com wrote:

> > For a better help instead of "a page" show us _the_ page
> > demonstrating your problem.

> http://www.rabobank.nl/particulieren/takes more than a minute to load
> with javascript enabled (during which the whole system is practically
> unresponsive).

On both IE and Firefox it takes ~ 4.1 seconds to load (average of 10
test loads in each browser, end of loading counted by "Done" message
appeared in the status bar, an external capturer is used). My Dell
notebook I took with me in Europe and tested with is very average by
its properties:
AMD Turion 64 X2 Mobile 1.8MHz
1Gb RAM
Wireless 128Kb upstream / 256Kb downstream Internet connection

For the page of such low complexity I would still expect 1-2 sec max
but they are using a purely DIV+CSS layout, that always adds 2-3 times
rendering time increase against of normal table layouts. Also their
http://www.rabobank.nl/particulieren/javascript/unobtrusive_home.js
used on the page is a nightmare of document.write's - with say flash
movies written right to the document head section, so parser has to
spend extra time to wait for all segments arrive and to bring the DOM
tree into some acceptable state. Still 4-5 secs with progressive
rendering (so you can see some part of the page right away) is totally
OK - unless one is trying to call 911 online :-) There is no question
of _1 minute_ delay here.
That means either of:
1) You are using some legacy PC
2) For some reason your connection to these segments of the Web gets
delayed.
3) You have some spyware/antivirus installed that takes forever to pre-
parse the input before let it in to the browser.

I would check first with 3) As the problem is not reproducible I'm out
of other ideas. If nothing helps, install NoScript addon for Firefox
and set script disabled for all problematic pages:
https://addons.mozilla.org/en-US/firefox/addon/722

> That means either of:
> 1) You are using some legacy PC

I'm using a 2.4 GHz P4 with 1.5GB RAM. Previously, these pages loaded
just fine...

> 2) For some reason your connection to these segments of the Web gets
> delayed.

Another PC on the same network has no problems

> 3) You have some spyware/antivirus installed that takes forever to pre-
> parse the input before let it in to the browser.

No antivirus installed, I just used an online scanner to check, no
viruses either.
Not sure about the spyware. I can imagine that spyware can seriously
affect some processes, so I'll scan my system and see if there is
something wrong there.

> I would check first with 3) As the problem is not reproducible I'm out
> of other ideas. If nothing helps, install NoScript addon for Firefox
> and set script disabled for all problematic pages:https://addons.mozilla.org/en-US/firefox/addon/722

Okay, will do. Thanks!

> 3) You have some spyware/antivirus installed that takes forever to pre-
> parse the input before let it in to the browser.

Just scanned for spyware, nothing found. So no virusses, no spyware,
what else can cause the execution of javascript to slow down so
significantly?
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc