Cuando se trata de una base de datos con una cantidad de documentos gigantes es una mala práctica traer todos los documentos a la aplicación web en una sola llamada.
Siempre es mejor fraccionar por una cantidad considerada la cantidad de documentos que se va a traer en la primer conexión y llamada a la base de datos.
When dealing with a database with a huge number of documents, it's bad practice to fetch all the documents to the web application in a single call. It's always better to split the number of documents to be fetched into the first connection and call to the database by a given amount.
In this case, I'm using Firebase, and the database has 26,500 documents, so I decided to bring in only 30 and use a button to allow 30 more to be uploaded successively. This makes it easier for me as a developer and easier for the user to work on the website.
In the code, you can see that performing a limited database query isn't that complex, and thanks to artificial intelligence, it helps me develop code more quickly and efficiently. This doesn't mean I use artificial intelligence for everything in my code, but rather for certain parts of the application that I consider necessary.