Nimesh t
asked on
DOM Recycling
need urgent help with dom recycling
ASKER
i have a webpage which loads 1000 records approx, but loading is slow and page dies if loaded in IE.
ASKER
want to display few records and load new set of records when scrolled up or down and delete outof view records from dom
You load 1000 records of DOM elements, don,t you? Or you load data from dataBase it your grid?
You need to look at an AJAX solution.
Initial load is only the records you are going to display - say 20. When you advance to another page you query the server using AJAX to send you the next batch of rows - you then add those to your model and display them.
However, 1000 records is not that much - what is in these records that is causing IE to crash.
Obviously we cannot give you any definitive answers because your question comprises 6 words and zero code - which is simply not enough to get a feel for what it is you are actually asking.
My advice is to put some effort into writing a detailed requirement with all the information we would need to answer the question, including the code you are using, some sample data so we can see what you are trying to load, some indication of the technology you are using server / client.
What version of Angular
How are you fetching data - what does your service look like in Angular
How are you processing service requests on the server
Initial load is only the records you are going to display - say 20. When you advance to another page you query the server using AJAX to send you the next batch of rows - you then add those to your model and display them.
However, 1000 records is not that much - what is in these records that is causing IE to crash.
Obviously we cannot give you any definitive answers because your question comprises 6 words and zero code - which is simply not enough to get a feel for what it is you are actually asking.
My advice is to put some effort into writing a detailed requirement with all the information we would need to answer the question, including the code you are using, some sample data so we can see what you are trying to load, some indication of the technology you are using server / client.
What version of Angular
How are you fetching data - what does your service look like in Angular
How are you processing service requests on the server
Hi,
If you are using Angular and want to display records using ngFor (Angular 2 or above version), you can fetch data from your server end by using paging mechanism concept. Means say, on the first hit to the server you fetch 50 records and display in the Screen and on mouse scroll down, you can fetch next 50 records and they can merge these records with the old one or replace the old data with new data and So on. We have already used this mechanism in our own projects where one of out UI needs to displays more than 100000 records using for. This process works us.
Hope this will help you with the problem.
If you are using Angular and want to display records using ngFor (Angular 2 or above version), you can fetch data from your server end by using paging mechanism concept. Means say, on the first hit to the server you fetch 50 records and display in the Screen and on mouse scroll down, you can fetch next 50 records and they can merge these records with the old one or replace the old data with new data and So on. We have already used this mechanism in our own projects where one of out UI needs to displays more than 100000 records using for. This process works us.
Hope this will help you with the problem.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Can you post some your code here?