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)
On branch db/8109