Currently, I am facing a challenge using mongoose and react to pull data from an mlab database. The issue lies in the fact that the mlab database is quite large, with a size of 200 MB and containing over 400,000 objects. This causes either a JS error (out of memory) or prolonged request times ranging from 2 to 3 minutes.
I am at a loss on how to optimize this process for better efficiency.
In addition, I have data formatting requirements but I am unsure whether it's more effective to handle this on the backend or frontend.
Your assistance in finding a solution would be greatly appreciated. Thank you in advance.