You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root problem is that mongoengine switched from pymongo ensure_index to create_index method inside mongoengine ensure_indexes. ensure_index had simple caching mechanizm but create_index doesn't have it.
This switch plus that ensure_indexes is called on each doc.save() results in that mongodb need to handle with createIndex which is quite heavy operation and in our case this results in 50% drop in performance.
ensure_index was added here #812 because there was problem with test and IMHO it was a workaround. Better solution could be to make proxy method drop_database similar to drop_collection which would reset cls._collection on Document.
Later I will prepare pull request with such change.
wojcikstefan, mindojo-victor, Lh4cKg and michealzavvari