Firebase delay in first database search

Asked

Viewed 231 times

1

Hello I have an order app and maybe he has login registration of everything... However I realized that when do the first search for some data within the application the response time is high and the second time flows very well. For me this does not bother but for the user it would be something bad. I would have to fix it ?

1 answer

2


There is an overload when establishing a connection for the first time. The connection is about a secure websocket, and to ensure that it is safe, there are several round trips between the client and the required server.

What you can do is access Firebase as soon as the application starts, instead of waiting for the first time (when you make your first request). This will start the websocket connection as soon as possible, so the perceived delay of the first real data request will not be as painful.

We’ve done something similar but it was with other technologies, we called "Database Warmup"

  • 1

    thanks for the tip!!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.