summaryrefslogtreecommitdiffstats
path: root/models/checklists.js
diff options
context:
space:
mode:
authorAlexis LACROIX <alexis.lacroix@orange.com>2017-02-22 15:03:33 +0100
committerLauri Ojansivu <x@xet7.org>2017-02-22 17:05:30 +0200
commit6ca832c02b2fa87720005f277b3fcb21dcf5ae6f (patch)
tree46083001472636f51ea2806bb0afb26afe1f852a /models/checklists.js
parentcd6317cedbd9815284d4e533f00fbc75c8e06afc (diff)
downloadwekan-6ca832c02b2fa87720005f277b3fcb21dcf5ae6f.tar.gz
wekan-6ca832c02b2fa87720005f277b3fcb21dcf5ae6f.tar.bz2
wekan-6ca832c02b2fa87720005f277b3fcb21dcf5ae6f.zip
Improve wekan performance (checklist collection scan)
Diffstat (limited to 'models/checklists.js')
-rw-r--r--models/checklists.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/checklists.js b/models/checklists.js
index 35be4dcc..3425f230 100644
--- a/models/checklists.js
+++ b/models/checklists.js
@@ -133,6 +133,10 @@ Checklists.mutations({
});
if (Meteor.isServer) {
+ Meteor.startup(() => {
+ Checklists._collection._ensureIndex({ cardId: 1, createdAt: 1 });
+ });
+
Checklists.after.insert((userId, doc) => {
Activities.insert({
userId,