Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8748695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:34:13+00:00 2026-06-13T12:34:13+00:00

I have a resource consuming DOM (browser) related JavaScript process. When started it blocks

  • 0

I have a resource consuming DOM (browser) related JavaScript process. When started it blocks the page (other DOM related processed). Is it possible to run this process in parallel asynchronously, and when it finished pass the result to main page? Web workers is not the case, as process works with DOM.

Can this be implemented with iframes? Does JS started in iframe block hosted page DOM too?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:34:14+00:00Added an answer on June 13, 2026 at 12:34 pm

    Actually it would be a prime example for using WebWorkers, but as you correctly mentioned you won’t have a reference to a DOM there. Your only option is to decouple that process into smaller task’s. If you can do that, you need to ask yourself two questions

    • do the smaller tasks need to run sequentially ?
    • can these tasks run asynchronously ?

    If you can answer both questions with No, you can setup a run-away script timer and execute those tasks asynchronously. Example:

    var taskList = [
        function() {},
        function() {},
        function() {},
        function() {}
        // a whole lot more entrys
    ];  // in a real-world scenario you would `.push()` values or functions
    
    (function _loop() {
        setTimeout(function() {
            var start = Date.now();
            do {
                taskList.shift()();
            } while( taskList.length && Date.now() - start < 100)
    
            if( taskList.length ) setTimeout( _loop, 100 );
        },100);
    }());
    

    The above algorythm would execute the functions contained by taskList as fast as possible, but within a time-frame of 100ms max. This will ensure that the browser respectively the UI thread won’t get blocked for longer than 100ms during the processing. Hence the browser will stay responsive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have multiple resource bundles in spring mvc? I want to
I have a resource Photos, which belongs to Adverts. In ActiveAdmin, users should be
I have a resource file named filetypes.resx. Some how I figured out to bind
I have couple resource DLLs that I currently load when application starts using following
I have a resource database where resources can belong to different locations. Users and
Say I have a resource (e.g. a filehandle or network socket) which has to
Consider that I have 1 resource and 2 urls (let's say new one and
Question in title pretty much sums it up. I have some resource object defined
I have a RESTful resource in my Rails app called Photo. I'm using Paperclip
I have a common resource, which I want 1 and only 1 instance of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.