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

120
Visualizações
Deleting large items from knockout.js array causes delay in page responsiveness

We iterate through an array of items that are filtered and deleted from the observable array. If the deletion is large, 1000+, the page is unresponsive for maybe 4 seconds. Is there a way to get around this?

Script

   for (m = 0, gamesLength = unscheduledGames.length; m < gamesLength; m++) {
                viewModel.unscheduled.games.remove(unscheduledGames[m]);
            }

DOM

     <!-- ko foreach: games -->
                        <!-- ko if: $data.Matchup() && $data.Matchup().Selected() -->
                        <div class="item-container draggable-item-container clearfix">
...More Stuff
                        </div>
                        <!-- /ko -->
     <!-- /ko -->
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think you want to use virtual scrolling for this. I don't really know knockout but I found this fiddle (jsfiddle.net/z4711/gk30zLs2/) with an example of implementation for virtual scroll in knockout (2 000 000 items displayed). Also this article might help you out.

Maybe it can give you some inspiration.

about 4 years ago · Juan Pablo Isaza Relatório
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