Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

216
Vistas
How Do I Improve Javascript Table Update Performance Issues?

So I'm running an app and I'm allowing the user to enter data into a table. Easy enough...I'm also trying to auto add the sums of the totals as they enter the totals. This works well enough when I do something like...

$(document).on("change", "input[name$='-budget_line_item_february']", function(){
  update_budget_total_february();
});

function update_budget_total_february()
{
  var total = 0;
  $("input[name$='-budget_line_item_february']:visible").each(function(index, element) {
      var val = parseFloat($(element).val());
      if( !isNaN( val )){
           total += val;
        }
      });
      $("#id_february_disabled_budget_total").val((total).toFixed(2));
      $("#id_february_budget_total").val((total).toFixed(2));
}

For a limited number of rows. As the rows grow....I'm noticing that performance is starting to take a hit. I'd rather not have to remove this functionality...and have them have to click a button to total everything....but it seems as if I allow unlimited rows...performance will suffer at some point? Because they can enter as many rows as they'd like I realize this is somewhat of a performance impacting operation...correct? Is there any way to provide this functionality in a manner whereas performance won't take as much of a hit?

Thanks in advance for any ideas or suggestions.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda