Supabase Cost Performance

Polling loop queries Supabase on a short interval — use Realtime instead

Part of the Realtime & cost check · fix arrives as a guide

What it is

A setInterval queries Supabase on a short interval to poll for changes.

Why it matters

Each client generates a steady stream of round trips whether or not anything changed, and the load scales with concurrent users rather than with actual activity. It also keeps polling in background tabs.

How to fix it

Replace it with a filtered Realtime subscription. Where polling must stay, lengthen the interval and pause it when document.hidden is true so inactive tabs stop costing anything.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.