near / near-explorer

NEAR blockchain explorer
https://explorer.near.org/
Apache License 2.0
85 stars 53 forks source link

chore: change interval to 30 seconds rather than every second #1236

Open roshaans opened 10 months ago

roshaans commented 10 months ago

According to the Database Query Insights, this query was run in the backend over 20 thousand times in just the past hour alone (Almost 4 million requests in the past 7 days) and each request takes on average 1.8 seconds to make and the result is just always one row.

This PR hopes to lessen this bottleneck query by extending the interval for this query from every second to every 30 seconds.

roshaans commented 10 months ago

Playwright tests seem to be failing because of a dependency on the database.

Screenshot 2023-09-18 at 5 45 21 PM

frol commented 10 months ago

@roshaans Unit-tests fail for a completely different reason (snapshot mismatch), I don't understand how they used to pass, though 🤷‍♂️