I am having issues with a slow Meteor app. I have narrowed it down to mongo performance, and am using the profiler to look at slow queries. I have a bunch of queries taking over 10 seconds. They all look approximately like the output below.
I believe these queries are coming from the row count at the bottom of each datatable in meteor-tabular . The table may have tens of thousands of rows, but each page should only show tens or hundreds of rows. I don't realy need the count
and would be happy to kill it if it is indeed causing these performance issues.
I found no way to disable this page count in meteor-datatables or in datatables itself. Is there a way?
{
"op" : "command",
"command" : {
"count" : "myCollection",
"query" : {
"user_id" : "someId"
},
"fields" : null
},
"keyUpdates" : 0,
"writeConflicts" : 0,
"numYield" : 1180,
"locks" : {
"Global" : {
"acquireCount" : {
"r" : NumberLong(2362)
}
},
"MMAPV1Journal" : {
"acquireCount" : {
"r" : NumberLong(2345)
},
"acquireWaitCount" : {
"r" : NumberLong(3)
},
"timeAcquiringMicros" : {
"r" : NumberLong(26215)
}
},
"Database" : {
"acquireCount" : {
"r" : NumberLong(1181)
}
},
"Collection" : {
"acquireCount" : {
"R" : NumberLong(1181)
},
"acquireWaitCount" : {
"R" : NumberLong(1164)
},
"timeAcquiringMicros" : {
"R" : NumberLong(12358760)
}
}
},
"responseLength" : 44,
"millis" : 33332,
"execStats" : {
},
"client" : "XX.XXX.XX.XXX"
}
If anyone is having this issue, I fixed it in my fork:
https://github.com/maxko87/meteor-tabular
I also submitted a pull request to aldeed/meteor-tabular, we'll see if that gets pulled in.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.