0

I'm using OpenLayers - 2.11,GeoServer 2.13, ExtJS 3.4, and Java for developing GIS based web applications.

Recently i'm getting below error message in my application

"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." Mostly it showing OpenLayers.js file.

I've done"about:config" and set "dom.max_script_run_time" to 20 and more and nothing seems to work.

Please guide me to solve this issue..

2

You probably have an infinite loop in your code or you are trying to do something too heavy for your processor to handle like loading to many vector in your map. We can't help you if you don't provide some code, but even with an example, I suspect your code is really complex so it won't help much...

Solution

  1. Check for infinite loop (or really long loop).
  2. Check for big object cloning (maybe inside a loop).
  3. Check for multiple object creation that may use all your RAM or CPU.
  4. Try to remove some code or part of your application one by one until it start working again to find the problematic part
  5. Build a small example that you can share through jsfiddle.net that reproduce the problem outside of your environment.
  6. Ask again, if you didn't find the problem yet, by showing us your small example.
  • Dear Julien-Samuel Lacroix.. thank you for the replay.I thought i was a Firefox issue. i have written js code for displaying more than 60 wms layers and around 5 vector layers. i will try to check each loop and all. – Ramesh T R Dec 10 '13 at 9:15
2

Looking at your comment to Julien's answer, you say you are trying to draw in 60 vector layers? This will probably be too much for any modern browser to handle, depending on their complexity.

If they are not too complex (just a few points and simple polygons) you could consider making them all 1 layer, but depending on the amount of objects you are trying to render this could still be too much. And I am assuming that you want different layers to allow the user to turn them on or off. Have you maybe considered using a WMS to deliver your layers? That way the layers would just be delivered as map tiles (images) which are easy and quick for the browser to render. There are lots of a good, stable and open source WMS servers out there such as GeoServer and MapServer.

Trying to render lots of vector objects in an OpenLayers map (or any map) is limited to how quickly a browser can process it, and you are likely to see severe performance hits and the 'Script unresponsive' message, especially in older browsers such as IE7 and 8.

  • Dear Rob Quincey.. Thank you for your replay. i have done some mistake in my previous comment. I'm using GeoServer for rendering all my 60 wms layers. You are correct ..for getting layerswitcher feature i'm using all in seperate layer.I have around 5 vector layers in my application. I have to load 200 vehicles in one layer. That is the only heavy functionality i'm using in my application. And i'm loading my web application only in Mozilla Firefox. – Ramesh T R Dec 10 '13 at 9:23
  • 1
    Ahh fair enough. 5 vectors should be fine, depending on how complex they are. I did find a page somewhere that allowed you to test how well OL performed with different numbers of vector markers, but I can't find it now. If I do I'll let you know. – Rob Quincey Dec 10 '13 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.