Skip to content

perf: ギャラリーが全件取得して3件ランダム表示 #10

@kwrkb

Description

@kwrkb

概要

app/gallery/page.tsx で全 completed レコードを取得し、JSでシャッフルして3件表示。データ量増加に伴いスケールしない。

対策案

  • Supabase RPCで ORDER BY random() LIMIT 3 を使うカスタム関数を作成
  • または .limit(10) 等で取得数を制限してからクライアント側でランダム選択

優先度

High

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions