Closed JoachimM7 closed 2 years ago
By the way: I took the result of my query and I wrote a Swift Dictionary with [String: Any]
. It took 0.04 seconds to print this out, what is still not very fast, but way faster then printing the BSON Document ;)
P.S.: Please don't get me wrong, printing out result is not necessary, but I think that there may be some other performance issues with the DocumentPairIterator
.
I use
BSON
inMongoKitten
and I have a aggregation, that returns twoDocument
. The query itself is very fast, it just needs 0.009 seconds. But printing out the documents increases the time to 0.22 seconds!This is my code:
I run the example and took a look at Instruments. Please have a look:
Is there any way how to improve this performance? Maybe I have to tell, that the documents are not very small and have a lot of key-value-properties (mostly boolean). But running the same query for example in Robo3T immediatly prints out the JSON string.