I list the data I pulled from the database in treeview. But I have one question. I have a city, county and neighborhood table. I write the districts of the selected province and the neighborhoods of the selected district on the table. There is no problem in printing one by one, but when we select a lot of data (all), this process takes about 17 minutes to run on the network. When I remove my hand from the All key, new data is constantly coming due to the request to the wep api.
What comes to my mind as a solution to this is;
Stopping the network when we stop selecting the All button. Making the user wait using the site by adding a 20-minute delay. (it doesn't make any sense.)
CodePudding user response:
try googling virtual scrolling it may help. Since the ngFor takes time to render the large data using virtual scrolling can help reducing the render time.
CodePudding user response:
private ngUnsubscribeNeighborhood = new Subject();
using the structure. I made a pipe assignment to the place where we subscribe. I set Pipe to takeUntil and assign it to ngUnsubscribeNeighborhood. Then I clicked a button. ngUnsubscribeMahalle.next();
I solved the problem by doing