#5043 Replace inefficient uses of skip() with ranged queries

unreleased
wont-fix
nobody
None
General
nobody
2014-04-01
2012-10-03
Cory Johns
No

The following files have uses of skip() which the Mongo documentation indicates is inefficient and should be replaced with ranged-based paging whenever possible.

  • Allura/allura/controllers/discuss.py
  • Allura/allura/controllers/project.py
  • Allura/allura/controllers/search.py
  • Allura/allura/controllers/site_admin.py
  • Allura/allura/ext/admin/admin_main.py
  • Allura/allura/model/discuss.py
  • ForgeBlog/forgeblog/main.py
  • ForgeDiscussion/forgediscussion/controllers/forum.py
  • ForgeShortUrl/forgeshorturl/main.py
  • ForgeTracker/forgetracker/model/ticket.py
  • ForgeWiki/forgewiki/wiki_main.py

When possible, in the above files, replace the use of skip() with a combination of sorting on, and range limiting by an indexed field.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2014-04-01

    These have not been performance issues, and using skip() allows us to keep track of page & limit params quite easily, whereas the more effecient query by _id greater than X, requires keeping track of what page goes with what _id limit, etc.

     
  • Dave Brondsema

    Dave Brondsema - 2014-04-01
    • status: open --> wont-fix
     

Log in to post a comment.