1.5 seconds seems slow. Does your app reuse a single MongoClient? If not, recreating a client for each find() will add latency due to setting up new connections each time.

Otherwise, could you try profiling the find() via py-spy, cProfile, and/or memray to help isolate the slow code?

2 Likes