Problem: Initializing a composite view in a puppet with a collection of ~ 500 takes an application for about a minute.
I am building a basic puppet application to maintain a list of items. When testing with a collection size of ~ 50, everything is fine. When the limit grows, the application stops responding.
Store.ItemsListView = Marionette.CompositeView.extend({
tagName: "div",
template: "#items-list",
itemView: Store.ItemView,
itemViewContainer: "tbody",
emptyView: Store.NoDataView,
});
Store.ItemView = Marionette.ItemView.extend({
tagName: "tr",
template: "#store-item"
});
I understand that this is mainly due to the DOM interaction [profiled javascript on the application page]. I tried to optimize on the template side by caching the compiled template source instead of the DOM link in itemView. But no significant improvement.
ItemView , . html src el. .
? , . , .