Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda