|Re: [jnosql-dev] MongoDBDocumentManager optimization|
What do you think of opening a PR with this point?Done.
Although I am not sure how to use aggregate (DefaultMongoDBTemplate)
to get Entities.
Hey Dmitry, how are you?
What do you think of opening a PR with this point?
Thank you for the feedback.
On Tue, Jun 13, 2023 at 7:17 PM Dmitry Repchevsky via jnosql-dev <jnosql-dev@xxxxxxxxxxx> wrote:
Looking at the MongoDBDocumentManager.java I noticed strange conversion
between Document -> BsonDocument in select/aggregate methods.
MongoCollection<Document> collection =
AggregateIterable<Document> aggregate = collection.aggregate(pipeline);
return stream(aggregate.spliterator(), false)
It's much faster not to convert Bson (what mongo operates with) to the
Document and them back.
MongoCollection<BsonDocument> collection =
AggregateIterable<BsonDocument> aggregate = collection.aggregate(pipeline);
return stream(aggregate.spliterator(), false);
Is there something I am missing?
jnosql-dev mailing list
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jnosql-dev
Back to the top