Improving query performance

Let's spend some time fixing our application's potential performance problems. According to the warning, we need to add an index for the group field in the /messages list. Let's get started:

  1. Switch to the Firebase console and click the Rules tab of the Database section.
  2. Update the rules, as shown in the following screenshot:

  1. Once you are ready, press the Publish button. At this point, Firebase builds an index and updates the data. You don't need to perform any extra steps at the client-side.
  2. Reload the page and check out the console's output.
  3. This time, you should see no performance warnings:

That's all when it comes to performance tuning our messages list. Now, let's learn how to implement the message editor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset