Unsolved QML Listview delegate recycling
-
In QML Listview, i am creating contact list which has 1000 contacts.
While scrolling through list view i observed many delegate items are getting created and and getting destroyed while moving to non visible area.This is a major performance impact on the application. while scrolling rapidly application responds very slowly. An suggestions please ...
-
Hi! Here is a list of general advice to improve delegate performance:
- implement as much as possible in C++, including the model and the GUI logic
- avoid JavaScript as much as possible
- reduce the amount of QML to a minimum
- use Loader for parallel delegate instantiation
- for everything that is only needed after the user interacts with a delegate (clicks on it etc) use Loader to instantiate those parts only on demand
-
@DonCoder See also the documentation for 'cacheBuffer' property of ListView:
Note: Setting this property is not a replacement for creating efficient delegates. It can improve the smoothness of scrolling behavior at the expense of additional memory usage. The fewer objects and bindings in a delegate, the faster a view can be scrolled. It is important to realize that setting a cacheBuffer will only postpone issues caused by slow-loading delegates, it is not a solution for this scenario.