Skip to content

Analytics Logs Run with High Priority #2634

Open
@AmitMY

Description

@AmitMY

[REQUIRED] Describe your environment

  • Browser version: Chrome 80
  • Firebase SDK version: ^7.6.1-0
  • Firebase Product: hosting, functions, analytics

[REQUIRED] Describe the problem

When using logEvent, the event logging requests run with high priority. Therefore, when I want to make an HTTP request, and also log the user event at the same time, I get this network stack, where my intentional HTTP request has a "waiting" time, probably caused because another high priority requests happen at the same time.
image

This is NOT the case with Google Analytics.

Steps to reproduce:

logEvent("an event");
setTimeout(() => fetch("my-api-url"), 0); // This happens in the next event loop

Fix:

Pull request #2635

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions