Closed Bug 1840655 Opened 2 years ago Closed 2 years ago

symbols front page is slow

Categories

(Tecken :: General, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

After removing the UploadsCreated model, the front page of symbols.mozilla.org now takes 30 seconds to render for people who are logged in and have permissions to view symbol data.

This bug covers reducing the front page so it's doing either no counts at all or fewer counts or cache things.

Assignee: nobody → willkg
Status: NEW → ASSIGNED
Keywords: regression
Regressed by: 1728859
Assignee: willkg → nobody
Status: ASSIGNED → NEW

The front page is a React thing and the request that takes a long time to come back is /api/stats/.

Some timings from today for /api/stats/:

  • 93s
  • 92s
  • 91s

This only affects people logged in and I see like 10 requests to this endpoint in the last 7 days. I'm going to fix this, but it's not a critical p1 problem because the site isn't used in this way much.

Oh! This only really affects people who have "view all uploads" permissions. There are 6 of us and only 3 of us have logged in over 2023. So this really only affects me.

The /api/stats/ calculates the following:

  • today
    • number of uploads
    • number of uploaded files
    • total size of uploaded files
  • yesterday
    • number of uploads
    • number of uploaded files
    • total size of uploaded files
  • last 30 days
    • number of uploads
    • number of uploaded files
    • total size of uploaded files

Then it also calculates:

  • missing symbols today
  • missing symbols yesterday
  • missing symbols last 30 days

If you have "view all symbols" permissions, it calculates that for everyone. If you don't, then it only calculates it for you.

I'm pretty sure we're emitting metrics to do the stats in Grafana. I can set up a dashboard for that when I need it.

We could change the stats so they only calculate personal stats. However, Marco's account uploads tons of symbols which is probably equivalent to seeing all the symbols and I can't easily test that scenario.

So I think I want to do this:

  1. remove missing symbols stats and uploaded files count and see if that's good enough
  2. if that's not good enough, remove the stats and we can re-add them after we get to GCP and have the ability to do scheduled tasks
Assignee: nobody → willkg
Status: NEW → ASSIGNED

willkg merged PR #2754: "bug 1840655: reduce home page stats" in 8307bfd.

Once this gets to production, we can see how it affects the timings for the front page. If it's good enough, we can stop here. I think good enough is <30s. If it's not good enough, then we should just remove the stats altogether.

This deployed just now with bug #1843856. Front page /api/stats/ call takes a couple of seconds to load now. Marking as FIXED.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: