From 0c6f050ae5d92fea724747e6571ea38254fd3da6 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 21 Apr 2015 15:50:24 +0000 Subject: [PATCH] Do not add taglist emails one by one, add them all in one, as the rendering process in magicsuggest would be very resource consuming --- etemplate/js/et2_widget_taglist.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index 708d454cf4..2eeab537eb 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -556,10 +556,13 @@ var et2_taglist_email = et2_taglist.extend( var taglist = this.taglist; window.setTimeout(function() { + var items = []; for(var i=0; i < parts.length; ++i) { - taglist.addToSelection({id: parts[i], label: parts[i]}); + items.push({id: parts[i], label: parts[i]}); + } + taglist.addToSelection(items); }, 10); } }