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.
精彩评论