hmarr/mongoengine — Issue #323: Performance Issue in ComplexBaseField (v0.5)
Author: manasgarg
Created: 2011-10-18 05:14:08+00:00
State: open

I have come across a performance issue in ComplexBaseField. The __get__ method of this field always performs dereferencing even if the the field was just accessed. This puts a performance penalty for repeated access of the field.

Generally, it may not be noticeable but one of our object has significant amount of data in a ListField. Every access to that ListField takes about ~30 msec (and it used to be free till 0.4).

One specific operation in our system jumped from 8 seconds to 65 seconds after an upgrade to 0.5 as a result of this :)

Please let me know if more details are required.

Thanks