I am using firebase for backend and react for frontend. Realtime is working fine but when I load page query takes 4 to 5 seconds to ge data from firestore. I want to know what is the issue. is it problem with firebase or with my code.
const docRef = doc(db, "users", user.uid);
const docSnap = await getDoc(docRef);
console.log('ss', docSnap.data())
I see that apending data into component is not time consuiming. it is query which is taking time. Is it problem because I am using free version of firestore?
configuration
const firebaseConfig = {
apiKey: "**********",
authDomain: "portfolio-8e33f.firebaseapp.com",
databaseURL: "https://portfolio-8e33f-default-rtdb.firebaseio.com",
projectId: "****",
storageBucket: "portfolio-8e33f.appspot.com",
messagingSenderId: "502330908580",
appId: "**********",
measurementId: "G-YD3HG54N45"
};
Region asia-east1
I am in Pakistan
I am at local host at the moment.
This code is on client side
My internet connection is having 2MB/sec speed
I am on window.
What do you mean by server side rendering?