hmarr/mongoengine — Issue #317: Dereferencing might load the whole db on save()
Author: jpfarias
Created: 2011-10-13 20:14:28+00:00
State: open

Hi!

Seem the circular references issue was fixed but there's still the problem with checking the whole tree in special cases - including mine.

In my case, I have a document class that stores some interesting points on a map. Now, each document also has a list of references for its neighbors within 1 mile of it that fits some requirements.

Now, this collection has about 1.8 million documents, and each might have around 20 to 50 neighbors and it is possible that the whole thing is interconnected.

In this case, when I retrieve a document, change some attribute and do a save(), it seems to load everything that is reachable from this document to check for changes, which takes forever to finish and will possibly load the whole database.

There's some code already to limit the depth search for references but looks like this part of the code is not in effect yet.

Hope I made myself clear.

Keep up the good work guys!