You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm updating a few hundred documents with batches, rendering is blocked while firestore is sending the changed documents back through the WebChannel. Having firebase.firestore.setLogLevel("debug") on I can see that I get a bunch of messages, one for each document change: [Connection]: WebChannel received: {"documentChange": .... While these messages are received the rendering of my application is blocked.
Using snapshot.docChanges() I have already got the documents and rendered the changes, but the lag happens after that, while the server is responding with pending writes.
The text was updated successfully, but these errors were encountered:
@antoniozzo Thanks for filing an issue! We're currently working on improving the performance of Firestore. While Firestore is processing the documents, the rendering of your application will unfortunately be blocked. However, if you update your documents in smaller batches, there will be gaps in between batches for you to render, even though the total amount of processing time required by Firestore is still the same.
Another option is to offload Firestore onto a web worker, which will free up your main thread while Firestore is processing documents received over WebChannel. The caveat is that persistence currently does not work when Firestore is run on web workers (though we currently have an experimental build trying to test that out).
Describe your environment
Describe the problem
When I'm updating a few hundred documents with batches, rendering is blocked while firestore is sending the changed documents back through the WebChannel. Having
firebase.firestore.setLogLevel("debug")
on I can see that I get a bunch of messages, one for each document change:[Connection]: WebChannel received: {"documentChange": ...
. While these messages are received the rendering of my application is blocked.Using
snapshot.docChanges()
I have already got the documents and rendered the changes, but the lag happens after that, while the server is responding with pending writes.The text was updated successfully, but these errors were encountered: