Extjs tips: Big Data Grid for Data removal and addition Efficiency Optimization

Source: Internet
Author: User

Slow: because each time a piece of data is removed from the Store, the Grid will be re-painted. When the data volume is large, it takes a long time, for example, it may take about 2 seconds to remove one of the 1500 grids. It takes more than 10 seconds to remove 10 Grid entries and 800 Grid entries. Google's browser is suspected of crash. Solution: 1. Disable Ext re-painting first. After deletion is completed, the re-painting function will be restored. The Code is as follows: [javascript] Ext. suspendLayouts (); store. remove (selection); Ext. resumeLayouts (true); www.2cto.com 2. First, disable the Store event. After processing is complete, restore the event, and then re-specify the store to the Grid. The Code is as follows: store. suspendEvents (); store. remove (selection); store. resumeEvents (); grid. reconfigure (store); 3. Use Ext. suspendLayouts (); store. suspendEvents (); store. remove (selection); store. resumeEvents (); grid. reconfigure (store); Ext. resumeLayouts (true );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.