Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Heavy load js - SP2010 - long time running script - freeze browser

$
0
0
The use of Web Workers is possible, but you need to code it all in core javascript. in a Worker, there is no DOM or DOcument tree, thus jQuery cannot be used.

Re: Showing a message

As long as you understand that everything in the browser is single threaded (javascript, screen painting, etc), then you can display a message, but you will need to use a setTimeout() so that your next piece of javascript only executes a few seconds later...

Example:
showMessageOnTheScreen();
setTimeout(function(){

    // Start doing your updates here... 

}, 1000);
If you want to show other updates as the updates are going on, you will need to use a similar approach. The setTimeout give the browser an opportunity to do "other stuff" - like paint the screen with your message.

Paul.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>