Kwissle

My real-time quiz battle game Kwissle.com

Crosstips.org

My fun Crossword solver project. Crosstips.org & Krysstips.se

Kung Fu

Fujian White Crane Kung Fu

Photos

Photoalbum, both old and new.

Twitter

Follow me on Twitter

Contact me

My contact details and how to contact me.

 

KungFuPeople.com
Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com


Mobile version of this page Mobile version of this page


 
PythonDjango

mongoengine vs. django-mongokit


23rd of May 2010

django-mongokit is the project you want to use if you want to connect your Django project to your MongoDB database via the pymongo Python wrapper. An alternative (dare I say competing alternative) is MongoEngine which is bridge between Django and straight to pymongo. The immediate difference you notice is the syntax. django-mongokit looks like MongoKit syntax and MongoEngine looks like Django ORM. They both accomplish pretty much the same thing. So, which one is fastest?

First of all, remember this? where I showed how django-mongokit sped past the SQL ORM like a lightning bullet. Well appears MongoEngine is even faster.

mongoengine vs. django-mongokit

That's an average of 23% faster for all three operations!



Comment

Nicolas Clairon - 24th May 2010  [«« Reply to this]
Hi,

Can you provide the script source you used for this benchmark ? What version of MongoKit did you used ? I'd like to see what can I do to improve MongoKit speed.

N.
Peter Bengtsson - 10th June 2010   [«« Reply to this]
It's tucked away in a branch of django-mongokit but I haven't put the branch online. I can just send you a zip of the whole damn project and hopefully you can just run it and find out what can be optimized more. Interested?

Unfortunately upgrading to the latest version of MongoKit that doesn't generate indexes every time didn't help. MongoEngine is still faster.
Alberto Paro - 25th May 2010  [«« Reply to this]
I've used both, but there approach are not django.
If you want use a django implementation of mongodb give a look to http://github.com/aparo/django-mongodb-engine the performance are the same of mongoengine if you the mongodb manager. But you work in the django way.
 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.