开发者

Mongoid is slow and shows this in the log: MONGODB cursor.refresh() for cursor 3474711247518436755

I am using admin_assistant and have hacked on MongoDB support. The only issue now is that the index page queries are incredibly slow. admin_assistant uses will_paginate for these queries. I verified that the exact slow-down spot is where the will paginate collection is first accessed (.empty?). In the log I see the query, and after that I see these being slowly printed:

MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755
MONGODB cursor.refresh() for cursor 3474711247518436755

I will probably try getting rid of will_paginate next, but the rest of the code is depending on it right now. Any ideas on what c开发者_如何学Goould cause the cursor refreshes?


Thanks for your comments, rubish!

I switched from will_paginate to kaminari and everything works now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜