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

  • Home
  • SEARCH
  • 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 7436097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:11:04+00:00 2026-05-29T10:11:04+00:00

I am not sure if I should be clearing everything or resetting something somewhere.

  • 0

I am not sure if I should be clearing everything or resetting something somewhere.

What is happening is that the browser will lock up for 10 – 30 seconds when setting a int value in the input textbox.

Here is a little snippet:

function RunIt() {
    $('#txTotW').bind('keyup', function () { 
        _totWidth = parseInt($(this).val()); 
        $('#totalWidth').text($(this).val()); 
        RunIt(); 
    });
    $('#txTotH').bind('keyup', function () { 
        _totHeight = parseInt($(this).val()); 
        RunIt(); 
    });
    $('#txBayCnt').bind('keyup', function () { 
        _bayCount = parseInt($(this).val()); 
        RunIt(); 
    });
}

If at any time one of the keyup events are fires I rebuild a table by .find('tr').remove() and this table only has three rows max at any time, but since the change of one value the entire table will be rebuilt.

This does not seem like a big enough load to make the browser lock up.

What can I do to fix this?

  • 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-29T10:11:05+00:00Added an answer on May 29, 2026 at 10:11 am

    When you bind a function to an event in jQuery, it is permanently stored in a data structure as behavior that will always happen when that event is called (unless you explicitly remove the binding). So when you call RunIt() from within those callbacks/handlers, you’re adding redundant functions to that structure. The reason this slows things down is that the number of redundant callbacks increases exponentially: first 1 on each event, then 2, then 4, then 8, and so on. You don’t need to call RunIt() from within those callbacks at all: the bindings will still be there.

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

Sidebar

Related Questions

I'm not sure if this is something I should do in T-SQL or not,
Unit testing sounds great to me, but I'm not sure I should spend any
I'm not sure how I should express this, but I'll give it a try.
I am not sure when I should use anonymous types instead of local variables
I am not sure what I should be doing here. Should I be hardcoding
Preface : I'm honestly not sure if this should be on StackOverflow, SuperUser or
I'm a new Windows programmer and I'm not sure where I should store user
I'm still a novice and I'm not sure how I should setup the profile
Many GDI+ classes implement IDisposable, but I'm not sure when I should call Dispose.
I'm developing a small swing application, and I'm not sure if I should use

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.