#8109 Reduce gridfs index creation

v1.5.0
closed
General
nobody
2016-07-28
2016-07-28
No

The File class creates a GridFS for basically any operation. This includes viewing any attachment, thumbnail, project icon, project screenshot etc. The pymongo GridFS code creates an index on { files_id: 1, n: 1 } every time (with a little caching from going through ensure_index) which is a really unnecessary. Pymongo 3.1 avoids all that index creation (see here but we aren't able to upgrade to pymongo 3.x since Ming doesn't support it yet: see https://sourceforge.net/p/merciless/bugs/27/ and https://sourceforge.net/p/merciless/mailman/merciless-discuss/thread/CAJfq2JEicmKpwb31uN1ju%3D1jS0bVDS6fGVjk3n-dpL-BEFX3fg%40mail.gmail.com/#msg34734599

We can work around it a little bit for the GridFS() constructor on 2.x But the index will still be created on deletes and writes (within the GridIn class)

Discussion

  • Dave Brondsema

    Dave Brondsema - 2016-07-28
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2016-07-28

    On branch db/8109

     
  • Dave Brondsema

    Dave Brondsema - 2016-07-28
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2016-08-22
    • Milestone: unreleased --> v1.5.0
     

Log in to post a comment.