No problem, since the CPU of the browser client is used, 2500 cycles is nothing. But under normal circumstances, there are rarely so many. If there is a lot of data, it will be paginated. It does not need to be done in one loop
I tried about 4000 items, but the rendering data would be delayed, so I wrote settimeout+push to continuously push array elements into it. However, I found that there is no need to worry about ng binding monitoring, you should worry about dom scrolling card.
AngularJS currently supports one-way binding to reduce consumption. If it is stuck, you can try adding double colons
The value insidecan also be bound one-way, changed to
To reduce the number of watches~
No problem, since the CPU of the browser client is used, 2500 cycles is nothing. But under normal circumstances, there are rarely so many. If there is a lot of data, it will be paginated. It does not need to be done in one loop
I tried about 4000 items, but the rendering data would be delayed, so I wrote settimeout+push to continuously push array elements into it.
However, I found that there is no need to worry about ng binding monitoring, you should worry about dom scrolling card.
You can refer to bindonce https://github.com/Pasvaz/bin... which can effectively solve the efficiency problems caused by watch