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 7185029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:19:28+00:00 2026-05-28T18:19:28+00:00

I have a simple webpage that serves as an introduction to a more complex

  • 0

I have a simple webpage that serves as an introduction to a more complex set of data.

This complex set of data takes a lot of time to render.

For new users when they arrive at the simple webpage I start rendering the complex page in the memory, creating html elements, etc without inserting them into the dom.

However this is still visibly slow, and causes scrolling on the introduction page to stall and lag.

I’m thinking about using webworkers. But before I commit to something like that I’m inquiring if that’s actually the way to go or if there are other solutions also possible. Thanks.

Edit:

Thinking about it I don’t actually access the dom when rendering data, the templating engine puts strings together to create html, so webworkers are totally fine.

Is there anything anyone can share about this method?

  • 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-05-28T18:19:29+00:00Added an answer on May 28, 2026 at 6:19 pm

    Certainly web workers would be the way to go. But for browsers that don’t support web workers (IE < 10), here is a fallback approach:

    If your code is synchronous, it will freeze the browser while it is running. However, if you can chunk your processing into decent sized chunks, you can break it up just enough to allow the browser a chance to respond to user interactions.

    So, this code:

    for (var i = 0; i < data.length; i++) {
        processData(data[i]);
    }
    

    Becomes this:

    var i = 0;
    (function processNext() {
        if (i < data.length) {
            processData(data[i++]);
            setTimout(processNext, 0);
        }
    })();
    

    It’s not ideal – if processData() does too much, the UI will still be unacceptably unresponsive. On the other hand, if it doesn’t do very much, it can slow your data processing down a lot. In the latter case, you can process a certain number of iterations at a time before calling setTimeout:

    var i = 0;
    (function processNext() {
        if (i < data.length) {
            for (var stop = i + 100; i < stop && i < data.length; i++) {
                processData(data[i]);
            }
            setTimout(processNext, 0);
        }
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webpage that takes 10 minutes to run one query against a
I am currently updating a webpage that has some very simple data displayed in
We have an asp.net webpage that uses viewstate. During a lengthy operation (that takes
I'm trying to get data from a webpage that serves a XML file periodically
I have a simple webpage that uses the jquery template plugin to dynamically load
A lot of lead up: I have a simple ASP .NET 3.5 data entry
I have a simple web page that till now didn't need any login. It
I have a simple jQuery code that runs on a web page that has
I have simple win service, that executes few tasks periodically. How should I pass
I have simple SSIS package which reads data from flat file and insert into

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.