Firebase takes the first search in the database

1

Hello, I have an applications application and it has tals login everything ... But I realized that when doing 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 a bad thing. Would you mind arranging this?

    
asked by anonymous 03.11.2017 / 22:21

1 answer

2

There is an overhead when establishing a connection for the first time. The connection is on a secure websocket, and to ensure it is secure, there are multiple round trips between the client and the server required.

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

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

    
03.11.2017 / 22:32