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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:10:24+00:00 2026-05-11T19:10:24+00:00

Have a large amount of HTML, but where I thought the bottleneck would be

  • 0

Have a large amount of HTML, but where I thought the bottleneck would be is incorrect: it’s when I’m opening the dialog, not when I’m building the string of HTML (~35ms), nor when I’m appending it to the dialog container div (~50ms). When calling dialog(“open”) below In FF, I’m consistently getting 1800+ ms, IE7 is around 17000(!) ms. I can live with 1800ms, but in IE7 (99% of my user base), that’s way too long.

// prep dialog
$("#print-box").dialog({
    bgiframe: false,
    width:900,
    height: 1000,
    modal: true,
    autoOpen: false,
    draggable: false
    });

// display selected items in print preview modal
$("#print-preview").click( function() {

    $('#print-box').empty();

    var tmp = ['<div class="print-container">'];
    var rows = $('[name="print-this-listing"]:checked').parents("div.listing").clone();

    for (var i=0; i < rows.length; i++) {
        tmp.push($(rows[i]).html());
    }

    tmp.push('</div>');

    $('#print-box').html(tmp.join(''));
    $('#print-box').dialog('open');
});

Any ideas? I’m trying to build a print preview page and would rather not take another round trip to the server to fetch all that data again, but it’s much much quicker than client-side right now.

  • 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-11T19:10:24+00:00Added an answer on May 11, 2026 at 7:10 pm

    I came across a similar problem in using the jQuery UI Dialog. To speed things up try opening the dialog first and then append the data.

        $('#print-box').dialog('open');
        $('#print-box').html(tmp.join(''));
    

    This seemed to help for me. Also check to see if you have any broken tags or malformed HTML in the string you are appending.

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

Sidebar

Related Questions

I have a table with a large amount of HTML in it that I
I have a php page which contains a large amount of HTML in it.
I have a large AJAX response which inserts a good amount of HTML. After
I have an HTML table, where each cell contains a large amount of data.
I have a large amount of data in a database. When I attempt to
I have a large amount of data to sort and query, and I can't
I have a program in which I have a large amount of items listed
I need some help in solving this problem. We have a large amount of
I have a rather large amount of data (100 MB or so), that I
I have a table with large amount of data and want to take too

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.