supabase-performance-tuning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Supabase Performance Tuning

Supabase 性能调优

Prerequisites

前提条件

  • Supabase SDK installed
  • Understanding of async patterns
  • Redis or in-memory cache available (optional)
  • Performance monitoring in place
  • 已安装Supabase SDK
  • 了解异步模式
  • 具备Redis或内存缓存(可选)
  • 已部署性能监控工具

Instructions

操作步骤

Step 1: Establish Baseline

步骤1:建立基准线

Measure current latency for critical Supabase operations.
测量关键Supabase操作的当前延迟。

Step 2: Implement Caching

步骤2:实施缓存

Add response caching for frequently accessed data.
为频繁访问的数据添加响应缓存。

Step 3: Enable Batching

步骤3:启用批处理

Use DataLoader or similar for automatic request batching.
使用DataLoader或类似工具实现自动请求批处理。

Step 4: Optimize Connections

步骤4:优化连接

Configure connection pooling with keep-alive.
配置带长连接的连接池。

Output

输出结果

  • Reduced API latency
  • Caching layer implemented
  • Request batching enabled
  • Connection pooling configured
  • 降低API延迟
  • 已实现缓存层
  • 已启用请求批处理
  • 已配置连接池

Error Handling

错误处理

See
{baseDir}/references/errors.md
for comprehensive error handling.
详见
{baseDir}/references/errors.md
获取全面的错误处理方案。

Examples

示例

See
{baseDir}/references/examples.md
for detailed examples.
详见
{baseDir}/references/examples.md
获取详细示例。

Resources

参考资源