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
This is probably a less common use case. I've got a mongoengine.Document that represents a common data structure in my application, which I store in my database, and it's great for that. But it's also a generally useful class, and in one place, we create it in an inner loop (to make use of its methods) without ever touching the database.
In this case, object instantiation can take up a non-trivial amount of time, especially compared to normal Python objects:
Is there any way to make this more efficient? Or perhaps even to signal to mongoengine: "This is never going to be written to disk, so I don't really need all the metaclass stuff"?
The text was updated successfully, but these errors were encountered:
I'd be curious what a comparison against marrow.schema:Container would be on the same hardware/setup as your first set of timeit tests. The overhead of a full ORM/ODM just to have a non-backed "data container" was the reason I wrote m.schema.
This is probably a less common use case. I've got a
mongoengine.Document
that represents a common data structure in my application, which I store in my database, and it's great for that. But it's also a generally useful class, and in one place, we create it in an inner loop (to make use of its methods) without ever touching the database.In this case, object instantiation can take up a non-trivial amount of time, especially compared to normal Python objects:
Is there any way to make this more efficient? Or perhaps even to signal to mongoengine: "This is never going to be written to disk, so I don't really need all the metaclass stuff"?
The text was updated successfully, but these errors were encountered: