v-model vue in excess causes a memory leak

  Recently encountered this problem a project development:

  Php backend data has been returned to the front-end needs, but because of too much data (20), leading to the front page render time is very long, and only when the console's preview will return the data rendering.

  The first is to troubleshoot the problem: a front-end interface to return data rendering problem or the problem of slow? Initially, once the data is too much, preview of return will be very slow, but once it returns to the front end of the rendering is completed. Here it is misleading to develop, leading to time spent troubleshooting interfaces, such as the environment. Thought it was a slow return to the interface, resulting in page loading wait, is not enough just to see the preview, preview js code is translated into the rear end of the front-end interface that can be viewed. So it should be page rendering speed is too slow, which leads to preview the return slowly.

  Second, positioning the front page rendering code Why slow: vue get a list loop, iterate to form elements in the form. When we form part of the cycle of code comments, page rendering normal. 20 data pages of the form elements about 100, and use the v-model two-way binding easy to modify. We will modify the v-model is: value when rendering it normal again, so page loads slowly to find a breakthrough point, too much vue in v-model causes a memory leak.

  So how to deal with this problem?

  I see a lot of Bowen suggested that the use of select native, but this can not achieve the two-way binding function.

  Currently this problem has not been solved, I will most fit a URL annexed to this question below:

  https://segmentfault.com/q/1010000010608719

     

 

Guess you like

Origin www.cnblogs.com/fanyuying-web/p/11352759.html